Re: Convert stmt back into queryString

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Colish <dan(at)unencrypted(dot)org>
Cc: PGHACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Convert stmt back into queryString
Date: 2009-08-05 02:00:24
Message-ID: 26751.1249437624@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dan Colish <dan(at)unencrypted(dot)org> writes:
> I am currently trying to convert an insertstmt back into a const
> char *queryString, but I can't find an existing function to do this
> for the life of me. I will write one if none exits, but I figured I
> ask here first. Unfortunately, nodeToString is not quite right for
> what I'm doing. Thanks in advance.

Hmm, you mean a Query, or a raw unanalyzed InsertStmt? If the former,
ruleutils.c will help. If the latter, be prepared to write a lot of
code; there's nothing closer than nodeToString, and even that is pretty
incomplete for raw grammar output nodes IIRC.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dan Colish 2009-08-05 02:12:43 Re: Convert stmt back into queryString
Previous Message Tom Lane 2009-08-05 01:43:34 Re: the case for machine-readable error fields