Re: Calling a function from another

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Együd Csaba <csegyud(at)freemail(dot)hu>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Calling a function from another
Date: 2003-02-15 08:49:38
Message-ID: 20030215004635.W74322-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sat, 15 Feb 2003, [iso-8859-1] Egyd 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?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Emmanuel Charpentier 2003-02-15 08:55:07 Re: Inquiry From Form [pgsql]
Previous Message Emmanuel Charpentier 2003-02-15 08:37:35 Re: Aggregates with non-commutative transition functions