Re: Range types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Range types
Date
Msg-id 3240.1260975357@sss.pgh.pa.us
Whole thread Raw
In response to Re: Range types  (Dimitri Fontaine <dfontaine@hi-media.com>)
Responses Re: Range types
List pgsql-hackers
Dimitri Fontaine <dfontaine@hi-media.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>>     foreach p2_member in unnest(p2) loop
>>         p1 := array(select period_except(p1_member, p2_member)
>>                 from unnest(p1) p1_member);
>>     end loop;
>> 
>> But maybe it can be done in a single SQL command.

> Yeah, as soon as you have LATERAL, I think. Without it there's no way to
> compose SRF in SQL, AFAIK.

Hm, how would you do it with LATERAL?  The problem is not so much
composition as the need for a variable number of rounds of composition.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch: Remove gcc dependency in definition of inline functions
Next
From: Robert Haas
Date:
Subject: Re: Patch: Remove gcc dependency in definition of inline functions