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

From: Jean-Gerard Pailloncy <jg(at)rilk(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PL/SQL: function call like $1($2)
Date: 2006-10-08 15:49:11
Message-ID: AD0B2218-1C80-45AB-AF07-D151E68DE17E@rilk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
RETURNS NULL ON NULL INPUT
SECURITY INVOKER

But it does not work.
I try EXECUTE f || ' ( ' || p || ' );' INTO res
But is does not work too.
There is no function to convert double precision[] to text.

Is it possible to do this without converting the array of double to
text ?

Pailloncy Jean-Gerard

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Peter 2006-10-08 19:04:01 Automatic locale detection?
Previous Message John DeSoi 2006-10-08 14:34:53 Re: pg web hosting with tsearch2?