Re: TODO item: list prepared queries - Mailing list pgsql-patches

From Tom Lane
Subject Re: TODO item: list prepared queries
Date
Msg-id 19889.1134575880@sss.pgh.pa.us
Whole thread Raw
In response to Re: TODO item: list prepared queries  ("Michael Paesold" <mpaesold@gmx.at>)
Responses Re: TODO item: list prepared queries  ("" <joe@mcknight.de>)
List pgsql-patches
"Michael Paesold" <mpaesold@gmx.at> writes:
> Tom Lane wrote:
>> BTW, pursuant to comments about David's proposal just now --- why is the
>> patch using text at all, rather than reverse-compiling the prepared
>> statement's querytree?

> Well, I think for the driver or application, to recognize queries as their
> own, it seems much easier if the query is given exaclty as it was sent.

Depends on what the intended use of the view is, I suppose --- but I
should think that drivers would tend to just look at the statement name
to decide if it's something they sent, rather than comparing the text
of the body.  Showing a reverse-compiled version would be more robust
in the face of cases like a subsequent change of schema search path,
RENAME commands, etc.

Also, while I have not looked at the patch to see where it's getting
the "original text" from, I'll bet lunch that it's wrong.  The structure
of the parser doesn't permit easy extraction of the original text
corresponding to just one SQL command.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: TODO item: list prepared queries
Next
From: ""
Date:
Subject: Re: TODO item: list prepared queries