prepared statement already exists - Mailing list pgsql-general

From Jim Bryan
Subject prepared statement already exists
Date
Msg-id 20060813174837.41006.qmail@web33507.mail.mud.yahoo.com
Whole thread Raw
Responses Re: prepared statement already exists  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Hi!  In a function to insert rows into a table, I keep
getting ERROR: prepared statement "updateplan" already
exists.  If any ideas; thanks.


CREATE OR REPLACE FUNCTION testPreparedStatement()
RETURNS SETOF FLOAT AS $$

DECLARE
tryint1 int4:=1 ;
tryint2 int4:=2 ;
BEGIN

PREPARE updatePlan ( int4, int4 ) AS INSERT INTO
testtable VALUES ( $1, $2 );

EXECUTE updatePlan ( tryint1, tryint2 ) ;

RETURN NEXT tryint1;
END;
$$
LANGUAGE 'plpgsql' VOLATILE;




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Best approach for a "gap-less" sequence
Next
From: "Tobias Herp"
Date:
Subject: Leaving out a schema from the dump/restore