From: elein <elein@varlena.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: elein <elein@varlena.com>
Cc: Robert Treat <xzilla@users.sourceforge.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: obtuse plpgsql function needs
Date: Wed, 23 Jul 2003 12:27:23 -0700
Message-ID: <20030723122723.C26401@cookie> (raw)
In-Reply-To: <15642.1058987750@sss.pgh.pa.us>
References: <1058913112.22259.271.camel@camel>
<20030722163335.A18881@cookie>
<1058965609.22259.292.camel@camel>
<20030723111201.D20411@cookie>
<15642.1058987750@sss.pgh.pa.us>
So, other than C, plperl or pltcl is the way to go.
As long as they can input generic composite types
(I wasn't sure of that, but I should have known),
they can access columns as array elements so you can
loop through them. And they'll tell you the number
of arguments. Ta da!
elein
On Wed, Jul 23, 2003 at 03:15:50PM -0400, Tom Lane wrote:
> elein <elein@varlena.com> writes:
> > You can do it in C, of course.
>
> Yeah. Also you could do it easily in plperl or pltcl (composite-type
> arguments get passed as perl hashes or Tcl arrays respectively).
> plpgsql does not have any facility for run-time determination of field
> names, so you're pretty much out of luck in that particular language.
>
> regards, tom lane
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: elein@varlena.com, tgl@sss.pgh.pa.us, xzilla@users.sourceforge.net
Subject: Re: obtuse plpgsql function needs
In-Reply-To: <20030723122723.C26401@cookie>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox