Re: Newbie ...Function error (Stored Procedure)? - Mailing list pgsql-general

From Arne Weiner
Subject Re: Newbie ...Function error (Stored Procedure)?
Date
Msg-id 3B8ABF2F.72D1A1B3@gmx.de
Whole thread Raw
List pgsql-general
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.

pgsql-general by date:

Previous
From: "Alex Knight"
Date:
Subject: Re: speed of communication and pgsql development
Next
From: "Ben Udkow"
Date:
Subject: ERROR: Function 'format_type(oid, int4)' does not exist