Re: PREPARE and transactions

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PREPARE and transactions
Date: 2004-07-11 03:07:59
Message-ID: 200407110307.i6B37xw24476@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:
> > Part of the problem is that PREPARE has no provision to overwrite an
> > existing plan (CREATE OR REPLACE). I run into this all the time because
> > I make heavy use of prepared statements to emulate an ISAM file system.
> > I have to jump through hoops to keep track of what statements are
> > already prepared to keep from bouncing the current transaction.
>
> Bruce - TODO?:
>
> * PREPARE OR REPLACE...
>
> This would be an incredibly useful command since there's no way of
> _checking_ in advance that a name is already used as a prepared statement...

For me the OR REPLACE is used for cases like CREATE FUNCTION where you
want to presever the oid of the function. Does OR REPLACE make sense
for functions? Should you just drop and ignore the error first?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-07-11 03:09:53 Re: PREPARE and transactions
Previous Message Bruce Momjian 2004-07-11 03:02:35 Re: Status report