X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D0FA04762EF for ; Mon, 28 Apr 2003 18:19:39 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 70FE84762BB for ; Mon, 28 Apr 2003 18:19:38 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h3SMJOF20006; Mon, 28 Apr 2003 18:19:24 -0400 (EDT) From: Bruce Momjian Message-Id: <200304282219.h3SMJOF20006@candle.pha.pa.us> Subject: Re: /* */ comments showing up in pg_stat_activity In-Reply-To: To: Rajesh Kumar Mallah Date: Mon, 28 Apr 2003 18:19:23 -0400 (EDT) Cc: Rajesh Kumar Mallah , Tom Lane , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, hits=-16.3 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/420 X-Sequence-Number: 13121 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@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073