Re: I want to send comments to the backend!

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: I want to send comments to the backend!
Date: 2003-03-21 22:24:07
Message-ID: 87isuc73zs.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2003-03-21 22:36:03 Re: [INTERFACES] Roadmap for FE/BE protocol redesign
Previous Message Barry Lind 2003-03-21 21:32:29 Re: [INTERFACES] Roadmap for FE/BE protocol redesign