Re: Problem with function invocation

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: DaVinci <bombadil(at)wanadoo(dot)es>
Cc: Lista PostgreSql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with function invocation
Date: 2001-04-16 15:19:42
Message-ID: Pine.BSF.4.21.0104160813410.71391-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mon, 16 Apr 2001, DaVinci wrote:

> Hello.
>
> When I create next function:
>
> create function pilpot() returns integer as '
> declare
> foo integer;
> begin
> foo = insert into aviso(user) values(1);
> return foo;
> end;
> ' language 'plpgsql';
>

What exactly are you trying to return from the function?
Removing the foo declaration and foo = from the insert line
(and double quoting the reserved word user) on 7.1 makes
the function work for me (I just returned 1).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lamar Owen 2001-04-16 16:16:57 RPMs for PostgreSQL7.1 available.
Previous Message Tom Lane 2001-04-16 15:15:55 Re: Problem with function invocation