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

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Jean-Gerard Pailloncy <jg(at)rilk(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PL/SQL: function call like $1($2)
Date: 2006-10-09 13:54:11
Message-ID: 20061009135411.GA26968@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 := 'SELECT ' || quote_ident(f) || '(' || quote_literal(textin(array_out(p))) || ')';
EXECUTE stmt INTO res;

--
Michael Fuhr

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2006-10-09 14:10:07 Re: column privileges
Previous Message Uyelik 2006-10-09 13:50:13 Re: PL/SQL: function call like $1($2)