Re: NOT EXIST for PREPARE - Mailing list pgsql-hackers

From Andres Freund
Subject Re: NOT EXIST for PREPARE
Date
Msg-id 20160322130118.GI3790@awork2.anarazel.de
Whole thread Raw
In response to NOT EXIST for PREPARE  (Yury Zhuravlev <u.zhuravlev@postgrespro.ru>)
Responses Re: NOT EXIST for PREPARE
Re: NOT EXIST for PREPARE
Re: NOT EXIST for PREPARE
Re: NOT EXIST for PREPARE
List pgsql-hackers
Hi,


On 2016-03-22 12:41:43 +0300, Yury Zhuravlev wrote:
> Do I understand correctly the only way know availability PREPARE it will
> appeal to pg_prepared_statements?
> I think this is not a good practice. In some cases, we may not be aware of
> the PREPARE made (pgpool). Moreover, it seems popular question in the
> Internet: http://stackoverflow.com/questions/1193020/php-postgresql-check-if-a-prepared-statement-already-exists
> 
> What do you think about adding NOT EXIST functionality to PREPARE?

Not very much. If you're not in in control of the prepared statements, you
can't be sure it's not an entirely different statement. So NOT EXISTS
doesn't really buy you anything, you'd still need to compare the
statement somehow.

Andres



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Speed up Clog Access by increasing CLOG buffers
Next
From: Petr Jelinek
Date:
Subject: Re: Proposal: Generic WAL logical messages