Re: [HACKERS] Error working with Temporary Sequences in plpgsql in 8.1 (8.0 works fine)

2006-01-17 Thread Michael Fuhr
On Tue, Jan 17, 2006 at 01:28:03PM -0500, Jaime Casanova wrote: > is the same problem as with temp tables, you must put their creation, > and in this case even the nextval in an execute... Curious that it works in 8.0, though. I wonder if the failure in 8.1 is an artifact of changing sequence fun

Re: [HACKERS] Error working with Temporary Sequences in plpgsql in 8.1 (8.0 works fine)

2006-01-17 Thread Jaime Casanova
On 1/17/06, Daniel Schuchardt <[EMAIL PROTECTED]> wrote: > Hi, > > here is a testcase: > > CREATE OR REPLACE FUNCTION testseq() > RETURNS void AS > $BODY$ > BEGIN > CREATE TEMP SEQUENCE test; > PERFORM testseq1(); > DROP SEQUENCE test; > RETURN; > END; $BODY$ > LANGUAGE 'plpgsql' VOLATILE; >

[HACKERS] Error working with Temporary Sequences in plpgsql in 8.1 (8.0 works fine)

2006-01-17 Thread Daniel Schuchardt
Hi, here is a testcase: CREATE OR REPLACE FUNCTION testseq() RETURNS void AS $BODY$ BEGIN CREATE TEMP SEQUENCE test; PERFORM testseq1(); DROP SEQUENCE test; RETURN; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE; ALTER FUNCTION testseq() OWNER TO postgres; CREATE OR REPLACE FUNCTION testseq1() RET