Re: extra function calls from query returning composite type - Mailing list pgsql-general

From Merlin Moncure
Subject Re: extra function calls from query returning composite type
Date
Msg-id CAHyXU0x69CFYnrcbf5qd03=iyTXTvyMQtCPjA4ZtPDvkZiGSJA@mail.gmail.com
Whole thread Raw
In response to Re: extra function calls from query returning composite type  (Ronald Peterson <ron@hub.yellowbank.com>)
List pgsql-general
On Wed, Dec 31, 2014 at 5:41 PM, Ronald Peterson <ron@hub.yellowbank.com> wrote:
> Thanks much.  Didn't know about LATERAL.  That's a solution.  Seems like the
> implementation could be improved though.  The existence of LATERAL seems to
> imply that it's possible.  Why introduce more complicated syntax?  Of course
> the syntax applies to more situations than this one.  But this case seems
> like it could be improved.

Well, LATERAL is SQL standard syntax, and the SQL standard expressly
forbids using 'lateral refrences' between table expressions (see here:
http://rhaas.blogspot.com/2010/04/finding-our-way-to-lateral.html for
some background info).  As to why they did it, I don't know, but
there' probably some complicated reason where not having that syntax
broke or made ambiguous existing stuff.  Given that, it's not likely
to change.

merlin


pgsql-general by date:

Previous
From: Rafal Pietrak
Date:
Subject: Re: partial "on-delete set null" constraint
Next
From: Adrian Klaver
Date:
Subject: Re: partial "on-delete set null" constraint