Re: [HACKERS] Domains and arrays and composites, oh my - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Domains and arrays and composites, oh my
Date
Msg-id 15150.1499974968@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Domains and arrays and composites, oh my  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [HACKERS] Domains and arrays and composites, oh my
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thursday, July 13, 2017, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> regression=# select * from fdc();
>> fdc
>> -------
>> (1,2)
>> (1 row)

> Select (fdc).* from fdc();  is considerably more intuitive that the cast.
> Does that give the expected multi-column result?

Yeah, it does, although I'm not sure how intuitive it is that the
parentheses are significant ...

regression=#  select * from fdc(); fdc  
-------(1,2)
(1 row)

regression=# select fdc from fdc(); fdc  
-------(1,2)
(1 row)

regression=# select fdc.* from fdc(); fdc  
-------(1,2)
(1 row)

regression=# select (fdc).* from fdc();r | i 
---+---1 | 2
(1 row)
        regards, tom lane



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [HACKERS] Domains and arrays and composites, oh my
Next
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] [WIP] Zipfian distribution in pgbench