Re: Implementing SQL/PSM for PG 8.2

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Denis Lussier <denis(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Implementing SQL/PSM for PG 8.2
Date: 2005-06-28 11:18:07
Message-ID: 42C131EF.70001@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/28/2005 5:55 AM, Peter Eisentraut wrote:
> Neil Conway wrote:
>> I agree the current parser is a hack, but it's difficult to see how
>> else it could be implemented.
>
> Since the lexical structure of SQL/PSM seems to be about the same as the
> main SQL, maybe you could get away with having the main parser just
> accepting any tokens at the point where the function body belongs and
> make it count BEGIN's and END's or whatever nesting elements there
> might be.
>

Which then would require that SPI gets another interface added that
allows to feed in a token sequence instead of a query string.

After thinking more about what I wrote yesterday I noticed that we would
lose the potential for query plan recompilation after system cache
invalidation if we do not keep the queries inside of a PL function in
some sort of source code (lexer tokens still are).

Jan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Rylander 2005-06-28 11:22:36 Re: ENUM like data type
Previous Message Andrew Dunstan 2005-06-28 11:17:24 Re: Occupied port warning