Re: Implemented current_query

From: Tomas Doran <bobtfish(at)bobtfish(dot)net>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Implemented current_query
Date: 2007-05-10 01:59:56
Message-ID: 3067A7EE-6A37-47A2-BAF2-B27B63EE0B57@bobtfish.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


On 7 May 2007, at 23:25, Neil Conway wrote:

> 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.
>
> * docs need a bit more detail (they should emphasize that it is the

Detail added. I'm none too happy with the phrasing, anyone suggest
better?

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

Done.

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

Also done, note OID has changed as I was having conflicts (template1
wouldn't build). Should I either pick something else unused which is
lower (is there anything?), move current_query to the end of the file
or just leave it be..

> * 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...

Should that be added to the TODO list?

Cheers
Tom

Attachment Content-Type Size
pgsql-current_query_2.patch application/octet-stream 11.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-05-10 02:09:53 Re: Implemented current_query
Previous Message David Fetter 2007-05-10 01:06:51 Problem with CREATE LANGUAGE in CVS TIP

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-05-10 02:09:53 Re: Implemented current_query
Previous Message Guillaume Smet 2007-05-09 23:41:28 Re: Have vacuum emit a warning when it runs out of maintenance_work_mem