Re: Domains and arrays and composites, oh my

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Domains and arrays and composites, oh my
Date: 2017-07-13 19:42:48
Message-ID: 15150.1499974968@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Thursday, July 13, 2017, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-07-13 19:49:47 Re: [WIP] Zipfian distribution in pgbench
Previous Message David G. Johnston 2017-07-13 19:36:30 Re: Domains and arrays and composites, oh my