fetch cursor into id, set_values .... -> problem

Поиск
Список
Период
Сортировка
От joe speigle
Тема fetch cursor into id, set_values .... -> problem
Дата
Msg-id 232689.48193.qm@web60714.mail.yahoo.com
обсуждение исходный текст
Список pgsql-novice
Hello,
I get this error
#error 1
ERROR:  syntax error at or near "," at character 525
LINE 15: FETCH curs INTO id, set_values;
                           ^
from this function

drop function sx(varchar) ;
CREATE OR REPLACE FUNCTION sx( varchar ) RETURNS varchar AS $$
DECLARE
str_in ALIAS FOR $1;
id RECORD  ;
set_values RECORD ;
curs CURSOR FOR SELECT id, set_values FROM constraint_table;
BEGIN
OPEN curs;
FETCH curs INTO id, set_values;
IF (str_in = set_values ) THEN RETURN 1::bit(2);
ELSE RETURN 0::bit(2);
END IF;
END;
$$  LANGUAGE plpgsql;


isn't it correct to declare as type RECORD  ?

thanks,
joseph.



____________________________________________________________________________________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Newbie Developer Question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: query efficiency - Can I speed it up?