From: | Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> |
---|---|
To: | Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: plpgsql |
Date: | 2003-10-20 06:34:17 |
Message-ID: | Pine.LNX.4.44.0310200832510.32277-100000@kix.fsv.cvut.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
This works fine. I have PostgreSQL 7.4
CREATE OR REPLACE FUNCTION foo1(int, int) RETURNS int AS '
BEGIN
RETURN $1 + $2;
END; ' LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION foo2() RETURNS boolean AS '
DECLARE i int;
BEGIN i := foo1(10,10);
RETURN i = 20;
END; ' LANGUAGE plpgsql;
testdb011=> \i pokus.sql
CREATE FUNCTION
CREATE FUNCTION
testdb011=> select foo2();
foo2
------
t
(1 řádka)
On Sat, 18 Oct 2003, Martin Marques wrote:
> We are trying to make some things work with plpgsql. The problem is that I
> built several functions that call one another, and I thought that the way of
> calling it was just making the assign:
>
> var:=func1(arg1,arg2);
>
> which gave me an error near ")".
>
> Now if I did the same, but like this:
>
> PERFORM ''SELECT func1(arg1,arg2)'';
>
> it didn't give the error anymore. The problem was that the other function
> (func1()) aparently didn't get executed (logs stop at the PERFORM).
>
> Am I doing something wrong?
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Harjo Korte | 2003-10-20 07:38:19 | Re: ecpg and blob's |
Previous Message | Dennis Gearon | 2003-10-20 05:30:15 | Quick quote for Install |