From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Deparsing DDL command strings |
Date: | 2012-10-05 14:03:03 |
Message-ID: | 8117.1349445783@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
> So I have a Node *parsetree containing some CHECK and DEFAULT raw
> expressions to work with. Those can reference non existing tables,
> either to-be-created or already-dropped.
Why don't you just pass the original query string, instead of writing
a mass of maintenance-requiring new code to reproduce it?
This would require (1) making sure the query string is still available
where needed. I think we are 99% of the way there but maybe not 100%.
(2) being able to identify the substring corresponding to the current
command, when we're processing a multi-command string. The parser could
easily provide that, I think --- we've just never insisted that it do
so before.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2012-10-05 14:13:47 | Re: Deparsing DDL command strings |
Previous Message | zafer yagmuroglu | 2012-10-05 13:36:12 | FW: PQntuples and PQgetvalue problem. |