Skip site navigation (1) Skip section navigation (2)

Re: TODO item: list prepared queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Paesold" <mpaesold(at)gmx(dot)at>
Cc: "Neil Conway" <neilc(at)samurai(dot)com>, "Joachim Wieland" <joe(at)mcknight(dot)de>, pgsql-patches(at)postgresql(dot)org
Subject: Re: TODO item: list prepared queries
Date: 2005-12-14 15:58:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
"Michael Paesold" <mpaesold(at)gmx(dot)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

In response to


pgsql-patches by date

Next:From: Ben GouldDate: 2005-12-14 16:45:22
Subject: BUG #2114: (patch) COPY FROM ... end of copy marker corrupt
Previous:From: Michael PaesoldDate: 2005-12-14 07:40:16
Subject: Re: TODO item: list prepared queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group