Обсуждение: Re: Newbie ...Function error (Stored Procedure)?

Поиск
Список
Период
Сортировка

Re: Newbie ...Function error (Stored Procedure)?

От
Arne Weiner
Дата:
You have to escape the ' inside of your function definition:

CREATE FUNCTION testid()
RETURNS INTEGER
AS 'SELECT nextval(\'seq1\');'
LANGUAGE 'SQL';

The quotationmark in front of seq1 terminated the literal string that
should contain your
SQL statement and the parser was confused to find an 's' behind the
literal string.

Arne.