Re: TODO item: list prepared queries

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: TODO item: list prepared queries
Дата
Msg-id 004c01c60081$b67b1a60$0f01a8c0@zaphod
обсуждение исходный текст
Ответ на TODO item: list prepared queries  (Joachim Wieland <joe@mcknight.de>)
Ответы Re: TODO item: list prepared queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:

> Neil Conway <neilc@samurai.com> writes:
>> One minor irritation is that the query string of prepared statements
>> created via SQL has "PREPARE ... AS" prefixed to it, whereas statements
>> prepared via the FE-BE protocol do not. This should probably be fixed,
>> but I can't see a clean way to do it: I think we'd need to munge the
>> actual SQL string itself and remove the "PREPARE ..." prefix. Thoughts?
>
> BTW, pursuant to comments about David's proposal just now --- why is the
> patch using text at all, rather than reverse-compiling the prepared
> statement's querytree?

Well, I think for the driver or application, to recognize queries as their
own, it seems much easier if the query is given exaclty as it was sent. I.e.
even including PREPARE -- if it sent this way. I am not sure of the latter,
but I would prefer to be given the original query string, PREPARE stripped
or not.

This comment is based on my assumption -- hopefully correct -- that the
querytree has indeed changed from the original query. E.g. removed redundant
parenthesis, added casts, etc.

Best Regards,
Michael Paesold



В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: TODO item: list prepared queries
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TODO item: list prepared queries