Re: [SQL] cursors in plpgsql

2003-09-17 Thread Tomasz Myrta
Releases before 7.4 are spotty about supporting backwards scan of complex queries --- if you have a join or aggregate in the query, it likely won't work, yielding either strange errors or wrong answers. It will work if the top plan node in the query is a SORT, though, so a possible workaround is to

Re: [SQL] cursors in plpgsql

2003-09-17 Thread Tom Lane
Tomasz Myrta <[EMAIL PROTECTED]> writes: > I wanted to use some select result several times in pl/pgsql function. > Neither move backward 1 in test; > nor > execute ''move backward 1 in test''; > doesn't work. Releases before 7.4 are spotty about supporting backwards scan of complex queri

Re: [SQL] Cursors in plpgsql

2001-04-17 Thread Josh Berkus
Preeti, > Is there a command in plpgsql similar to %NOTFOUND of oracle? Cursors are not currently supported for PL/pgSQL. There are plans to include them for and upcoming version of Postgres. But dont' wait your application on it. > i want to write a load script which takes each row from the