From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mike Mascari <mascarm(at)mascari(dot)com>, Guillaume LELARGE <gleu(at)wanadoo(dot)fr>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>, Andrew Gould <andrewgould(at)yahoo(dot)com> |
Subject: | Re: [GENERAL] capturing and storing query statement with |
Date: | 2003-06-25 21:40:47 |
Message-ID: | 200306252140.h5PLelL13783@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Added to TODO:
* Promote debug_query_string into a server-side function
current_query()
---------------------------------------------------------------------------
Joe Conway wrote:
> Tom Lane wrote:
> > Joe Conway <mail(at)joeconway(dot)com> writes:
> >
> >>I was thinking something similar. This exact question has come up at
> >>least three times in the last three months. I doubt we'd want a special
> >>keyword like CURRENT_QUERY, but maybe current_query()?
> >
> > Not unless you want to promote a quick debugging hack, not expected or
> > required to work 100%, into a supported feature. I don't think
> > debug_query_string can be relied on to always reflect what the system
> > is doing, particularly not in the 3.0 protocol extended-query case.
> > And how about when you're executing queries inside a function --- is it
> > supposed to tell you about the most closely nested SQL query?
> >
> > I don't say this is not worth doing --- but I do say you are opening a
> > larger can of worms than you probably think.
> >
>
> Hmmm. Good points. This one may best wait for 7.5 at least. Does it make
> sense to turn it into a TODO?
>
> * promote debug_query_string into a documented, supported feature
>
> Anyone who *does* use the function from dblink, please be sure to report
> circumstances where dblink_current_query() returns something other than
> what you would expect.
>
> Thanks,
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Karsten Hilbert | 2003-06-25 21:51:26 | Re: INSERT WHERE NOT EXISTS |
Previous Message | Dennis Gearon | 2003-06-25 21:22:10 | Re: INSERT WHERE NOT EXISTS |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael A Nachbaur | 2003-06-25 21:47:52 | Re: RServ patch to support multiple slaves (sorta) |
Previous Message | Bruce Momjian | 2003-06-25 21:38:33 | Re: RServ patch to support multiple slaves (sorta) |