| From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Yury Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Tatsuo Ishii <ishii(at)postgresql(dot)org> |
| Subject: | Re: NOT EXIST for PREPARE |
| Date: | 2016-03-22 14:30:54 |
| Message-ID: | CAFcNs+oBP3U3JCTrzadHrundkFjkSAoSPCx_Q3z6FujCQbgoYA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Mar 22, 2016 at 10:01 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> 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.
>
You're correct, but IMHO it should be used when you have control of
prepared statement... isn't it analogous to CREATE TABLE IF NOT EXISTS??
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2016-03-22 14:36:13 | Re: Speed up Clog Access by increasing CLOG buffers |
| Previous Message | Yury Zhuravlev | 2016-03-22 14:08:56 | Re: NOT EXIST for PREPARE |