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 

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to