From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Greg Smith <greg(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Subject: | Re: Command Triggers |
Date: | 2012-01-18 09:09:34 |
Message-ID: | 8762g92x81.fsf@hi-media-techno.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
>> I still have some cleaning to do before to prepare the next patch
>> version, such as documentation updating and dealing with rewrites of
>> CHECK and DEFAULT column constraints in CREATE TABLE. I had to add
>> support for the T_A_Const parser node, and now I'm about to see about
>> adding support for the T_A_Expr one, but I can't help to wonder how the
>> rewriter could work without them.
>
> It doesn't, and it shouldn't have to. If those nodes get to the
> rewriter then somebody forgot to apply parse analysis. What's your test
> case?
I'm trying to rewrite the command string from the parse tree, and the
simple example that I use to raise an ERROR is the following:
create table foo (id serial, foo integer default 1, primary key(id));
I don't know if the parsetree handed by ProcessUtility() has gone
through parse analysis and I don't know if that's needed to execute the
commands, so maybe I have some high level function to call before
walking the parse tree in my new rewriting support?
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2012-01-18 09:11:56 | Re: Patch: Allow SQL-language functions to reference parameters by parameter name |
Previous Message | Heikki Linnakangas | 2012-01-18 08:08:40 | Re: Client Messages |