Search Postgresql Archives

Re: access computed field of RECORD variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steve White wrote:

> The roadblock is: 
> 
> There is a record, which may be from any of a set of similar databases. 
> Field names for this record are computed as strings.  Using these strings,
> I need to access fields of the record.
> 
> But I can't find the syntax for it.

You can't do this with plpgsql.  There are some limited possibilities
with "EXECUTE 'foo bar $1 baz' USING rec" where the $1 is expanded with
the record.  However the best thing you can do is use a different PL,
probably PL/Perl.



-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux