2009/10/22 Itagaki Takahiro <itagaki.takah...@oss.ntt.co.jp>: > > Tom Lane <t...@sss.pgh.pa.us> wrote: > >> 3. The pre-transform hook would have a signature like >> Node *hook(ParseState *pstate, ColumnRef *cref) >> >> 4. The post-transform hook would have a signature like >> Node *hook(ParseState *pstate, ColumnRef *cref, Node *var) > > Are there any relationships between the hooks and > Function Call Hook/parser hook submitted by Pavel-san? > https://commitfest.postgresql.org/action/patch_view?id=160
No, "my" hook was little bit more general and global. And I was to able inject running environment. > > If we can also use them in normal SQL parsing, they are very useful > to implement SYSDATE global variable for porting from Oracle. > I thing, so you need a global hook, and it isn't what Tom propose. But Tom's proposal is correct - we don't need plpgsql behave ouside plpgsql. Simply, if you like add some special variables like SYSDATE or others, then you need some add new global hook. Pavel Regards Pavel Stehule > Regards, > --- > ITAGAKI Takahiro > NTT Open Source Software Center > > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers