Re: [BUGS] BUG #3662: Seems that more than one run of a functions causes an error

2007-10-10 Thread Tom Lane
Oh, there's another solution I forgot to mention: you could write the nextval call as nextval('s'::text) which would force a runtime lookup of 's' on each call. On the whole though, numbering the rows yourself with a local counter is going to run a lot faster.

Re: [BUGS] BUG #3662: Seems that more than one run of a functions causes an error

2007-10-10 Thread Tom Lane
Robins Tharakan [EMAIL PROTECTED] writes: BEGIN CREATE TEMPORARY SEQUENCE s INCREMENT BY 1 START WITH 1; FOR rec in SELECT nextval('s') as rank, tt.scheme_code, tt.ret ... DROP SEQUENCE s; END; Sorry, that's not going to work, for fundamentally the same reason that

[BUGS] BUG #3662: Seems that more than one run of a functions causes an error

2007-10-09 Thread Robins Tharakan
The following bug has been logged online: Bug reference: 3662 Logged by: Robins Tharakan Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.5 Operating system: Windows XP Professional SP2 Description:Seems that more than one run of a functions causes an error