plpgsql Cursor Mismatched Parentheses
От | |
---|---|
Тема | plpgsql Cursor Mismatched Parentheses |
Дата | |
Msg-id | 200207120832.24c4@th00.opsion.fr обсуждение исходный текст |
Ответы |
Re: plpgsql Cursor Mismatched Parentheses
|
Список | pgsql-general |
Hi! I have never successfully used bounded parameterized cursors. Error occurs when opening cursor. Please see below and help! Regards, CN =========================== CREATE FUNCTION test(SMALLINT,SMALLINT) RETURNS BOOLEAN AS ' DECLARE y1 ALIAS FOR $1; m1 ALIAS FOR $2; o TEXT; y2 SMALLINT; m2 SMALLINT; c CURSOR (o TEXT,y1 SMALLINT,m1 SMALLINT,y2 SMALLINT,m2 SMALLINT) IS SELECT column1,column2 FROM table1 WHERE column9=o AND column3 BETWEEN (SELECT column3 FROM table1 WHERE column9=o AND column1=y1 AND column2=m1) AND (SELECT column3 FROM table1 WHERE column9=o AND column1=y2 AND column2=m2) ORDER BY 1,2; BEGIN o:=''xxx''; y2:=2002; m2=7; OPEN c(o,y1,m1,y2,m2); CLOSE c; RETURN TRUE; END;' LANGUAGE 'plpgsql'; ====================== database=# select test(2002,5); NOTICE: plpgsql: ERROR during compile of test near line 17 ERROR: mismatched parentheses -------------------------------------------------------- You too can have your own email address from Eurosport. http://www.eurosport.com
В списке pgsql-general по дате отправления: