Re: revised patch for PL/PgSQL table functions - Mailing list pgsql-patches

From Tom Lane
Subject Re: revised patch for PL/PgSQL table functions
Date
Msg-id 2741.1030395100@sss.pgh.pa.us
Whole thread Raw
In response to Re: revised patch for PL/PgSQL table functions  (Neil Conway <neilc@samurai.com>)
Responses Re: revised patch for PL/PgSQL table functions  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> Here's another improved patch. I got the parser to accept 'RETURN
> NEXT' properly (thanks to Frank Ch. Eigler @ RH for his help),
> although the solution might not be perfect: I changed the scanner to
> accept 'return next' as a single token (allowing for a variable amount
> of whitespace between the first and second words, of course). If you
> have a better suggestion, let me know.

Consider doing it the way that the main parser converts "UNION JOIN"
into a single token --- viz, there's an outer filter that calls the
lexer an extra time to look ahead one token when necessary.  Doing this
in the lexer is really quite messy if you want to do it right (eg,
deal correctly with comments between the two keywords).

> I'd like to see this patch get into 7.3beta1 --

Me too ;-).  I am planning to review your PREPARE patch next, then look
at Joe's SRF stuff in general, and then this ...

            regards, tom lane

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] pg_attribute.attisinherited ?
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: [HACKERS] TODO Done. Superuser backend slot reservations