Re: TODO item: list prepared queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-patches(at)postgresql(dot)org
Subject: Re: TODO item: list prepared queries
Date: 2006-01-03 20:47:04
Message-ID: 19695.1136321224@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> In any case, if we use the query string as supplied by the user, how do
> we produce that string in the case of SQL PREPARE? Manually stripping a
> "PREPARE ... AS" prefix from the query string is difficult to do
> robustly, but it seems (a) expensive (b) inconsistent to deparse the
> Query for SQL PREPARE but not for Parse messages. We could just include
> the "PREPARE ... AS" prefix for SQL PREPAREs, but that seems ugly.

I don't see the problem. Defining the view field as "the string sent to
the server to create the prepared statement" seems perfectly consistent
to me.

In practice, any given application will probably use one method to the
exclusion of the other, and wouldn't notice the "inconsistency" anyway.
If you are using both methods of preparing statements for some reason,
it's not improbable that you would want to know which way a given
statement was created, and seeing the PREPARE in there would be a useful
cue.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Hannu Krosing 2006-01-03 21:42:53 Re: Stats collector performance improvement
Previous Message Tom Lane 2006-01-03 20:40:25 Re: [BUGS] BUG #2129: dblink problem