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

From: Arne Weiner <aswr(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Newbie ...Function error (Stored Procedure)?
Date: 2001-08-27 21:44:15
Message-ID: 3B8ABF2F.72D1A1B3@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message satish rao 2001-08-28 06:52:36 Create table syntax
Previous Message Ron S 2001-08-27 19:34:14 Newbie ...Function error (Stored Procedure)?