Re: /* */ comments showing up in pg_stat_activity

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: /* */ comments showing up in pg_stat_activity
Date: 2003-04-26 02:47:54
Message-ID: 3EA9F35A.848AB5D1@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-04-26 03:05:26 Re: /* */ comments showing up in pg_stat_activity
Previous Message Jan Wieck 2003-04-26 02:32:03 Re: Statement triggers 7.4 NEW/OLD