Re: /* */ comments showing up in pg_stat_activity

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rajesh Kumar Mallah <rmallah(at)trade-india(dot)com>
Cc: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql(at)postgresql(dot)org
Subject: Re: /* */ comments showing up in pg_stat_activity
Date: 2003-04-28 22:19:23
Message-ID: 200304282219.h3SMJOF20006@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Rajesh Kumar Mallah wrote:
> But if i were to use DBD::Perl (which probably uses libpq)
> is it safe to pass query indentifier in comments which u
> said are not stripped by psql eg
> /* AppName: Xyzt */ Select foo from bar where cw='t' ;
> for years to come ?
>
> why i ask is that i was always curious of the slow
> long running queries in pg_stat_activity and not able
> to figure out the source had frustrated me , now
> this method if it works seems to me as a viable solution.

I think you have to look try perl to see how it handles it, but I think
it just passes the query whole, so all the comments should pass
themselves to the backend.

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message mallah 2003-04-29 00:14:43 Re: plpgsql Question..
Previous Message Joseph Syjuco 2003-04-28 17:33:59 jsp postgres installation/configuration howto url