On Thu, Jan 24, 2013 at 09:51:46AM -0800, David Fetter wrote:
> Folks,
>
> Andrew Gierth asked me to send this out as his email is in a parlous
> state at the moment. My comments will follow in replies. Without
> further ado:
> [snip]
>
> As I see it, the current options are:
>
> 1. Do nothing, and insist on non-standard use of the LATERAL keyword.
>
> 2. Add UNNEST to the grammar (or parse analysis) as a special case, making
> it implicitly LATERAL.
>
> (This would make implementing S301 easier, but special cases are ugly.)
>
> 3. Make all cases of SRFs in the FROM-clause implicitly LATERAL.
>
> (As far as I can tell, those cases whose behaviour would be changed by
> this actually produce errors in versions prior to 9.3, so no working
> code should be affected.)
>
> Since LATERAL is new in 9.3, I think the pros and cons of these choices
> should be considered now, rather than being allowed to slide by unexamined.
Please find attached a patch which implements approach 3. The vast
majority of it is changes to the regression tests. The removed
regression tests in join.{sql,out} are no longer errors, although some
of them are pretty standard DoS attacks, hence they're all removed.
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate