Re: BUG #2629: libpq - Cannot deallocate prepared statement created with PQprepare()

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: BUG #2629: libpq - Cannot deallocate prepared statement created with PQprepare()
Дата
Msg-id
14368.1158413320@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #2629: libpq - Cannot deallocate prepared statement created with PQprepare() "Andy McCurdy" <andy.mccurdy@emergent.net>
Re: BUG #2629: libpq - Cannot deallocate prepared statement created with PQprepare() Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #2629: libpq - Cannot deallocate prepared statement created with PQprepare() Michael Fuhr <mike@fuhr.org>
"Andy McCurdy"  writes:
> result = PQprepare(conn, "MyQuery", "select * from pg_stat_activity", 0,
> NULL);

I believe the above will result in preparing a statement named "MyQuery",
ie, no case-folding happens on the second argument of PQprepare, because
it never goes through the SQL parser.

> /* 
> THE FOLLOW PQEXEC() FAILS.  Error message says:  ERROR:  prepared statement
> "myquery" does not exist"
> */
> result = PQexec(conn, "DEALLOCATE MyQuery");

I think this would work:

result = PQexec(conn, "DEALLOCATE \"MyQuery\"");

			regards, tom lane
В списке pgsql-bugs по дате отправления
От: Michael Fuhr
Дата:
От: Ross Elliott
Дата:
FAQ