Re: PREPARE and transactions - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: PREPARE and transactions
Date
Msg-id 200407110307.i6B37xw24476@candle.pha.pa.us
Whole thread Raw
In response to Re: PREPARE and transactions  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List 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@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Status report
Next
From: Bruce Momjian
Date:
Subject: Re: PREPARE and transactions