Re: [SQL] order by when using cursors

2008-06-18 Thread Patrick Scharrenberg
Pavel Stehule wrote: >> it's known problem - column and variable names collision, so when you >> use any SQL statement inside procedure you have to be carefully about >> using variable names. Oh, I didn't took notice of that. Now knowing it is not a bug and how it works, it makes things much easi

Re: [SQL] order by when using cursors

2008-06-17 Thread Pavel Stehule
2008/6/18 Pavel Stehule <[EMAIL PROTECTED]>: > Hello > > it's known problem - column and variable names collision, so when you > use any SQL statement inside procedure you have to be carefully about > using variable names. > > postgres=# CREATE OR REPLACE FUNCTION testcur( OUT _a integer, OUT _b in

Re: [SQL] order by when using cursors

2008-06-17 Thread Pavel Stehule
Hello it's known problem - column and variable names collision, so when you use any SQL statement inside procedure you have to be carefully about using variable names. postgres=# CREATE OR REPLACE FUNCTION testcur( OUT _a integer, OUT _b integer ) RETURNS SETOF RECORD AS $$ DECLARE cur ref