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 17:45:53 |
Message-ID: | 9D29FD18CBD74A478CBA86E6EF6DBAD4030802AC@CHI4EVS04.corp.transunion.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
>From: pgsql-interfaces-owner(at)postgresql(dot)org
>[mailto:pgsql-interfaces-owner(at)postgresql(dot)org] On Behalf Of
>Daniel Verite
> Haszlakiewicz, Eric wrote:
>> dealloc_result = PQexecParams(conn, "DEALLOCATE $1", 1, deallocTypes,
>> deallocValues, deallocLengths, deallocFormats, 1);
>>
>> But I get this error:
>> syntax error at or near "$1" at character 12
>
>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.
eric
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Verite | 2008-12-03 21:01:02 | Re: deallocating prepared statements |
Previous Message | Haszlakiewicz, Eric | 2008-12-03 17:38:27 | Re: deallocating prepared statements |