Re: Unable to run one pl/pgSQL function :-(

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Bruno Baguette <bruno(dot)baguette(at)netcourrier(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unable to run one pl/pgSQL function :-(
Date: 2002-06-22 02:19:36
Message-ID: 20020621191753.J4586-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Fri, 21 Jun 2002, Bruno Baguette wrote:

> Hello,
>
> I've written a little pl/pgSQL function in order to use it on a little
> postgreSQL database :
>
> CREATE function tuple_add(VARCHAR(200)) RETURNS text AS
> '
> DECLARE
> Response text;
> PeopleName ALIAS FOR $1;
> BEGIN
> INSERT INTO PEOPLES VALUES (SEQUENCE_Id.NEXTVAL(),PeopleName);

I'd suggest:
nextval(''sequence_id'') (or if SEQUENCE_Id was made with double
quotes, nextval(''"sequence_id"'') )

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Barry Lind 2002-06-22 03:46:09 Re: timezone incompatibility
Previous Message Marc G. Fournier 2002-06-22 01:16:57 Re: comp.databases.postgresql.hackers