Re: [GENERAL] PL/SQL: function call like $1($2)

2006-10-09 Thread Merlin Moncure
On 10/9/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Sun, Oct 08, 2006 at 05:49:11PM +0200, Jean-Gerard Pailloncy wrote: > I try EXECUTE f || ' ( ' || p || ' );' INTO res > But is does not work too. > There is no function to convert double precision[] to text. You could use the types' input an

Re: [GENERAL] PL/SQL: function call like $1($2)

2006-10-09 Thread Uyelik
Hi, you may try; execute 'select ' || f || '(' || p || ')' into res; Merlin Moncure wrote, On 09.10.2006 16:35: On 10/8/06, Jean-Gerard Pailloncy <[EMAIL PROTECTED]> wrote: I want to create a function in PL/SQL as CREATE OR REPLACE FUNCTION "f_do" (text, double precision[]) RETURNS

Re: [GENERAL] PL/SQL: function call like $1($2)

2006-10-09 Thread Michael Fuhr
On Sun, Oct 08, 2006 at 05:49:11PM +0200, Jean-Gerard Pailloncy wrote: > I try EXECUTE f || ' ( ' || p || ' );' INTO res > But is does not work too. > There is no function to convert double precision[] to text. You could use the types' input and output functions or perhaps array_to_string(). stmt

Re: [GENERAL] PL/SQL: function call like $1($2)

2006-10-09 Thread Merlin Moncure
On 10/8/06, Jean-Gerard Pailloncy <[EMAIL PROTECTED]> wrote: I want to create a function in PL/SQL as CREATE OR REPLACE FUNCTION "f_do" (text, double precision[]) RETURNS double precision AS ' DECLARE f text := $1; p double precision[] := $2; res double precision; BEGIN SELECT

Re: [GENERAL] PL/SQL: function call like $1($2)

2006-10-08 Thread David Fetter
On Sun, Oct 08, 2006 at 05:49:11PM +0200, Jean-Gerard Pailloncy wrote: > I want to create a function in PL/SQL as > CREATE OR REPLACE FUNCTION "f_do" (text, double precision[]) RETURNS > double precision AS ' > DECLARE > f text := $1; > p double precision[] := $2; > res double precisi

[GENERAL] PL/SQL: function call like $1($2)

2006-10-08 Thread Jean-Gerard Pailloncy
I want to create a function in PL/SQL as CREATE OR REPLACE FUNCTION "f_do" (text, double precision[]) RETURNS double precision AS ' DECLARE f text := $1; p double precision[] := $2; res double precision; BEGIN SELECT f(p) into res; RETURN res; END;' LANGUAGE "plpgsql" STABLE