prepared statement already exists

From: Jim Bryan <gooddayarizona(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: prepared statement already exists
Date: 2006-08-13 17:48:37
Message-ID: 20060813174837.41006.qmail@web33507.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2006-08-13 18:09:40 Re: Best approach for a "gap-less" sequence
Previous Message macgillivary 2006-08-13 16:27:30 Re: Migrating PostgreSQL database to MySQL/MS Access