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

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

From
Arne Weiner
Date:
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.