Re: Calling a function from another - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Calling a function from another
Date
Msg-id 20030215004635.W74322-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Calling a function from another  (Együd Csaba <csegyud@freemail.hu>)
List pgsql-general
On Sat, 15 Feb 2003, [iso-8859-1] Egy�d Csaba wrote:

> Hi,
> Could you please give me some help? I would like to call a function from
> another. There are three functions, (say fa(int,int), fb(int,int) and
> fc(int,int)). What's the problem with this:
>
> create function "fc" (int, int) returns int as'
> declare
>   x alias for $1;
>   y alias for $2;
> begin
>   perform fa (x,y);
>   perform fb (x,y);
> end;
> ' language 'plpgsql'
>

> I tried all of them above. When I called them one after another from the
> console, they worked proprely. But calling the composite function it did
> nothing. No errors, just does not do anything.

All of those functions do have errors, but I'm not sure why you don't get
a message.  There's no return in any of them although that may be a cut
and paste error.  With a return, current sources at least seem to have the
above work (I made two functions with raise notice and both notices are
raised).  Can you make a complete example from scratch?


pgsql-general by date:

Previous
From: Emmanuel Charpentier
Date:
Subject: Re: Aggregates with non-commutative transition functions
Next
From: Emmanuel Charpentier
Date:
Subject: Re: Inquiry From Form [pgsql]