Skip site navigation (1) Skip section navigation (2)

Re: deallocating prepared statements

From: "Haszlakiewicz, Eric" <EHASZLA(at)transunion(dot)com>
To: "Daniel Verite" <daniel(at)manitou-mail(dot)org>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: deallocating prepared statements
Date: 2008-12-03 21:27:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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 
>> >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 
>> 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
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!


In response to

pgsql-interfaces by date

Next:From: Whit ArmstrongDate: 2008-12-09 15:08:35
Subject: simple example of copying data from a c/c++ array into postgres
Previous:From: Daniel VeriteDate: 2008-12-03 21:01:02
Subject: Re: deallocating prepared statements

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group