Re: deallocating prepared statements

Поиск
Список
Период
Сортировка
От Haszlakiewicz, Eric
Тема Re: deallocating prepared statements
Дата
Msg-id 9D29FD18CBD74A478CBA86E6EF6DBAD4030803C1@CHI4EVS04.corp.transunion.com
обсуждение исходный текст
Ответ на Re: deallocating prepared statements  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-interfaces
>-----Original Message-----
>Daniel Verite
>    Haszlakiewicz, Eric wrote:
>
>> >The prepared statement's name is not a literal, and in general
>> >parameterized queries don't accept parameters beyond literals. So
>you
>> >need to insert the name directly into the SQL command text.
>> >
>>
>> Well, that sucks.  Now I need to worry about quoting and escaping. :(
>> Is there a limit of what characters can be used in statement names?
>> Neither the docs for PQprepare(), nor the docs for the prepare
>statement
>> say anything about that.
>
>I think the statement's name is an "identifier", just like a table or
>column name.
>So it has to follow the rules defined for identifiers in the "SQL
>syntax" chapter.
>
>
> Best regards,
>--
> Daniel

ah.. yes, that makes sense.      The syntax for identifiers is relatively
simple
(http://www.postgresql.org/docs/8.2/interactive/sql-syntax-lexical.html#
SQL-SYNTAX-IDENTIFIERS), so I _don't_ need to worry about quoting all
that much, just checking for invalid characters.  That's much easier.
Thanks for the pointer!

eric


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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: deallocating prepared statements
Следующее
От: "Whit Armstrong"
Дата:
Сообщение: simple example of copying data from a c/c++ array into postgres