Re: Field count in a RECORD variable - plpgsql

From: Richard Huxton <dev(at)archonet(dot)com>
To: Mike Preston <MPreston(at)mosscodilis(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Field count in a RECORD variable - plpgsql
Date: 2005-03-01 15:55:07
Message-ID: 4224905B.30207@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Preston wrote:
> I am building a generic crosstab function in plpgsql, where I can pass
> in a SQL statement and return back the data pivoted with the values of
> one column serving as headers of the return columns. If I use a RECORD
> variable to scroll through the data, is there a way for me to tell the
> number of fields returned by the SQL statement parameter?

No. You'll want to use pltcl or plperl or some similar more-dynamic
language.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-03-01 15:57:51 Re: Problem with pg_hba.conf
Previous Message Vitaly Belman 2005-03-01 15:48:44 Re: Backupping the table values