Calling a function from another
От | Együd Csaba |
---|---|
Тема | Calling a function from another |
Дата | |
Msg-id | 002d01c2d4c9$c0dd5180$200a0a0a@notebook обсуждение исходный текст |
Ответы |
Re: Calling a function from another
|
Список | pgsql-general |
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' Or this: create function "fc" (int, int) returns int as' declare x alias for $1; y alias for $2; begin execute ''select fa('' || x || '','' || y || '')''; execute ''select fb('' || x || '','' || y || '')''; end; ' language 'plpgsql' Or this: create function "fc" (int, int) returns int as' declare x alias for $1; y alias for $2; begin execute ''select fa('' || quote_literal(x) || '','' || quote_literal(y) || '')''; execute ''select fb('' || quote_literal(x) || '','' || quote_literal(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. How should I call these functions. Thank you in advance, Csaba
В списке pgsql-general по дате отправления: