Re: /* */ comments showing up in pg_stat_activity - Mailing list pgsql-sql

From Jan Wieck
Subject Re: /* */ comments showing up in pg_stat_activity
Date
Msg-id 3EA9F35A.848AB5D1@Yahoo.com
Whole thread Raw
In response to Re: /* */ comments showing up in pg_stat_activity  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: /* */ comments showing up in pg_stat_activity  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
We do, but that wasn't the question.

I think you can asume that it'll stay that way because it is part of the
query string the backend is currently chewing on. What shows up in
pg_stat_activity is whatever was in the received query buffer before
starting to parse it. So we would have a hard time at that point to
filter out the comments.

The question back is from where does such a query with a comment come?
If it is a standard client like psql, it could happen someday that this
client does some filtering. If you're using libpq or another API that is
basically a libpq wrapper, you're pretty safe.


Jan

Bruce Momjian wrote:
> 
> Yes, we support /* */ comments.
> 
> ---------------------------------------------------------------------------
> 
> Rajesh Kumar Mallah wrote:
> >
> >
> >
> > Hmm ..
> > i just saw /* */ comments are being shown in current_query
> > is it ok ?
> >
> > More importantly is it supposed to remain like that ?
> > In that case i can tag every query with some identifier
> > to know from which application it originated when i check
> > em in pg_stat_activity !
> >
> >
> > regds
> > mallah.
>

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Statement triggers 7.4 NEW/OLD
Next
From: Tom Lane
Date:
Subject: Re: /* */ comments showing up in pg_stat_activity