pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feeddeallocate statement failing
4+ messages / 3 participants
[nested] [flat]
* deallocate statement failing
@ 2020-02-07 05:02 rob stone <floriparob@gmail.com>
2020-02-07 05:15 ` Re: deallocate statement failing Adrian Klaver <adrian.klaver@aklaver.com>
2020-02-07 05:48 ` Re: deallocate statement failing Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: rob stone @ 2020-02-07 05:02 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello,
Version:-
PostgreSQL 12.1 (Debian 12.1-2) on x86_64-pc-linux-gnu, compiled by gcc
(Debian 9.2.1-22) 9.2.1 20200104, 64-bit
Log:-
2020-02-07 15:42:55 AEDT LOG: statement: SELECT COUNT(*) AS ps_count
FROM pg_prepared_statements WHERE name = 'AIT1581050529'
2020-02-07 15:42:55 AEDT ERROR: syntax error at or near
"'AIT1581050529'" at character 13
2020-02-07 15:42:55 AEDT STATEMENT: DEALLOCATE 'AIT1581050529'
The deallocate statement fails. It doesn't matter if it is just
"DEALLOCATE" or "DEALLOCATE PREPARE".
We put in the count statement to make sure the prepared statement still
existed and only issued the "DEALLOCATE" if ps_count is greater then
zero.
Does anybody know why it is giving this syntax error?
TIA,
Rob
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: deallocate statement failing
2020-02-07 05:02 deallocate statement failing rob stone <floriparob@gmail.com>
@ 2020-02-07 05:15 ` Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 0 replies; 4+ messages in thread
From: Adrian Klaver @ 2020-02-07 05:15 UTC (permalink / raw)
To: rob stone <floriparob@gmail.com>; pgsql-general@lists.postgresql.org
On 2/6/20 9:02 PM, rob stone wrote:
> Hello,
>
> Version:-
>
>
> PostgreSQL 12.1 (Debian 12.1-2) on x86_64-pc-linux-gnu, compiled by gcc
> (Debian 9.2.1-22) 9.2.1 20200104, 64-bit
>
> Log:-
>
> 2020-02-07 15:42:55 AEDT LOG: statement: SELECT COUNT(*) AS ps_count
> FROM pg_prepared_statements WHERE name = 'AIT1581050529'
> 2020-02-07 15:42:55 AEDT ERROR: syntax error at or near
> "'AIT1581050529'" at character 13
> 2020-02-07 15:42:55 AEDT STATEMENT: DEALLOCATE 'AIT1581050529'
>
Try:
DEALLOCATE AIT1581050529;
>
> The deallocate statement fails. It doesn't matter if it is just
> "DEALLOCATE" or "DEALLOCATE PREPARE".
> We put in the count statement to make sure the prepared statement still
> existed and only issued the "DEALLOCATE" if ps_count is greater then
> zero.
>
> Does anybody know why it is giving this syntax error?
>
> TIA,
> Rob
>
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: deallocate statement failing
2020-02-07 05:02 deallocate statement failing rob stone <floriparob@gmail.com>
@ 2020-02-07 05:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-07 06:46 ` Re: deallocate statement failing rob stone <floriparob@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Tom Lane @ 2020-02-07 05:48 UTC (permalink / raw)
To: rob stone <floriparob@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
rob stone <floriparob@gmail.com> writes:
> 2020-02-07 15:42:55 AEDT ERROR: syntax error at or near
> "'AIT1581050529'" at character 13
> 2020-02-07 15:42:55 AEDT STATEMENT: DEALLOCATE 'AIT1581050529'
> The deallocate statement fails. It doesn't matter if it is just
> "DEALLOCATE" or "DEALLOCATE PREPARE".
I think you want double quotes not single quotes. The argument
of DEALLOCATE is an SQL identifier, not a string literal.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: deallocate statement failing
2020-02-07 05:02 deallocate statement failing rob stone <floriparob@gmail.com>
2020-02-07 05:48 ` Re: deallocate statement failing Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-02-07 06:46 ` rob stone <floriparob@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: rob stone @ 2020-02-07 06:46 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org
On Fri, 2020-02-07 at 00:48 -0500, Tom Lane wrote:
> rob stone <floriparob@gmail.com> writes:
> > 2020-02-07 15:42:55 AEDT ERROR: syntax error at or near
> > "'AIT1581050529'" at character 13
> > 2020-02-07 15:42:55 AEDT STATEMENT: DEALLOCATE 'AIT1581050529'
> > The deallocate statement fails. It doesn't matter if it is just
> > "DEALLOCATE" or "DEALLOCATE PREPARE".
>
> I think you want double quotes not single quotes. The argument
> of DEALLOCATE is an SQL identifier, not a string literal.
>
> regards, tom lane
That worked. Thanks.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-02-07 06:46 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 05:02 deallocate statement failing rob stone <floriparob@gmail.com>
2020-02-07 05:15 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-02-07 05:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-07 06:46 ` rob stone <floriparob@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox