Re: [HACKERS] Domains and arrays and composites, oh my

2017-10-24 Thread Tom Lane
I wrote: > Anyway, PFA an updated patch that also fixes some conflicts with the > already-committed arrays-of-domains patch. I realized that the pending patch for jsonb_build_object doesn't actually have any conflict with what I needed to touch here, so I went ahead and fixed the JSON functions

Re: [HACKERS] Domains and arrays and composites, oh my

2017-10-19 Thread Tom Lane
I wrote: > Andrew Dunstan writes: >> On 09/28/2017 01:02 PM, Tom Lane wrote: I do think that treating a function returning a domain-over-composite differently from one returning a base composite is a POLA. We'd be very hard put to explain the reasons

Re: [HACKERS] Domains and arrays and composites, oh my

2017-09-28 Thread Tom Lane
Andrew Dunstan writes: > On 09/28/2017 01:02 PM, Tom Lane wrote: >>> I do think that treating a function returning a domain-over-composite >>> differently from one returning a base composite is a POLA. We'd be very >>> hard put to explain the reasons for it to an

Re: [HACKERS] Domains and arrays and composites, oh my

2017-09-28 Thread Andrew Dunstan
On 09/28/2017 01:02 PM, Tom Lane wrote: > >> I do think that treating a function returning a domain-over-composite >> differently from one returning a base composite is a POLA. We'd be very >> hard put to explain the reasons for it to an end user. > Do you have any thoughts about how we ought to

Re: [HACKERS] Domains and arrays and composites, oh my

2017-09-28 Thread Tom Lane
Andrew Dunstan writes: > On 07/13/2017 03:19 PM, Tom Lane wrote: >> Attached is a draft patch that allows domains over composite types. >> I think it's probably complete on its own terms, but there are some >> questions around behavior of functions returning

Re: [HACKERS] Domains and arrays and composites, oh my

2017-09-28 Thread Andrew Dunstan
On 07/13/2017 03:19 PM, Tom Lane wrote: > I wrote: >> I started to look into allowing domains over composite types, which is >> another never-implemented case that there's no very good reason not to >> allow. Well, other than the argument that the SQL standard only allows >> domains over

Re: [HACKERS] Domains and arrays and composites, oh my

2017-08-02 Thread Robert Haas
On Thu, Jul 13, 2017 at 3:42 PM, Tom Lane wrote: > Yeah, it does, although I'm not sure how intuitive it is that the > parentheses are significant ... > > regression=# select fdc.* from fdc(); > fdc > --- > (1,2) > (1 row) > > regression=# select (fdc).* from fdc(); >

Re: [HACKERS] Domains and arrays and composites, oh my

2017-07-13 Thread Tom Lane
"David G. Johnston" writes: > On Thursday, July 13, 2017, Tom Lane 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

Re: [HACKERS] Domains and arrays and composites, oh my

2017-07-13 Thread David G. Johnston
On Thursday, July 13, 2017, Tom Lane 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? David J.

Re: [HACKERS] Domains and arrays and composites, oh my

2017-07-13 Thread Tom Lane
I wrote: > I started to look into allowing domains over composite types, which is > another never-implemented case that there's no very good reason not to > allow. Well, other than the argument that the SQL standard only allows > domains over "predefined" (built-in) types ... but we blew past

[HACKERS] Domains and arrays and composites, oh my

2017-07-11 Thread Tom Lane
I started to look into allowing domains over composite types, which is another never-implemented case that there's no very good reason not to allow. Well, other than the argument that the SQL standard only allows domains over "predefined" (built-in) types ... but we blew past that restriction