Re: Implemented current_query

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tomas Doran <bobtfish(at)bobtfish(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Implemented current_query
Date: 2007-05-07 22:25:19
Message-ID: 1178576719.6034.9.camel@goldbach
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, 2007-07-05 at 19:48 +0100, Tomas Doran wrote:
> As suggested in the TODO list (and as I need the functionality
> myself), I have implemented the current_query interface to
> debug_query_string.

Comments:

* docs need a bit more detail (they should emphasize that it is the
current query string submitted by the client, as opposed to the
currently executing SPI command or the like). Also, the docs currently
claim current_query() returns "name".

* use textin() to convert C-style strings to text, rather than
constructing a text datum by hand

* perhaps we can get away with marking current_query() stable?

* AFAIK debug_query_string() still does the wrong thing when the user
submits multiple queries in a single protocol message (separated by
semi-colons). Not sure there's a way to fix that that is both easy and
efficient, though...

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fuhry 2007-05-07 22:29:50 Re: Behavior of GENERATED columns per SQL2003
Previous Message Peter Eisentraut 2007-05-07 22:02:32 Re: psqlodbc - psqlodbc: Put Autotools-generated files into subdirectory

Browse pgsql-patches by date

  From Date Subject
Next Message Zoltan Boszormenyi 2007-05-08 10:46:34 Re: [HACKERS] Behavior of GENERATED columns per SQL2003
Previous Message William Lawrance 2007-05-07 21:46:29 ECPG patch to use prepare for improved performance