pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: pgsql-interfaces@postgresql.org
Subject: Re: I want to send comments to the backend!
Date: 21 Mar 2003 17:24:07 -0500
Message-ID: <87isuc73zs.fsf@stark.dyndns.tv> (raw)
In-Reply-To: <23655.1048175249@sss.pgh.pa.us>
References: <200303201522.h2KFMpp24991@candle.pha.pa.us>
	<23655.1048175249@sss.pgh.pa.us>


Tom Lane <tgl@sss.pgh.pa.us> writes:

> I think he's complaining that psql strips out the comments before
> sending stuff to the backend.  Unfortunately, most of the world probably
> considers that a feature, not a bug.

I don't know why this user wants them but I can give one example of why one
might want to have comments get processed by the backend:

In my previous project we had the database wrapper functions insert the file
and line number where the call to the wrapper functions were made in sql
comments in the query.

This was **invaluable** for tracking down problems when the only evidence was
information in the logs or query cache. It was so valuable and so easy that I
definitely intend to reimplement it on my current project and on any future
projects.

> I'm quite certain that libpq does not strip comments, so the complaint
> isn't strictly accurate...

Happy news. But a plea to any interface implementors: *Please* don't even
consider stripping comments from queries, It would be most annoying for at
least this user.

--
greg




view thread (25+ messages)

Message-ID: <87isuc73zs.fsf@stark.dyndns.tv>
Permalink:  ../87isuc73zs.fsf@stark.dyndns.tv/
Also on:    postgresql.org/message-id/87isuc73zs.fsf@stark.dyndns.tv

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: gsstark@mit.edu
  Subject: Re: I want to send comments to the backend!
  In-Reply-To: <87isuc73zs.fsf@stark.dyndns.tv>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox