Re: I want to send comments to the backend!
От | Greg Stark |
---|---|
Тема | Re: I want to send comments to the backend! |
Дата | |
Msg-id | 87isuc73zs.fsf@stark.dyndns.tv обсуждение исходный текст |
Ответ на | Re: I want to send comments to the backend! (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-interfaces |
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
В списке pgsql-interfaces по дате отправления: