Re: Referencing Cursor/Row/Record Fields in PL/PgSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lee Hughes <lee(at)hughesys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Referencing Cursor/Row/Record Fields in PL/PgSQL
Date: 2009-02-10 21:22:22
Message-ID: 24610.1234300942@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Lee Hughes <lee(at)hughesys(dot)com> writes:
> Trying to figure out how to reference a field in a cursor result, or in a
> row/record variable that I've FETCHed the cursor into, where the target
> field name is in a variable or parameter. I think I'm just missing the
> dereferencing syntax.

There isn't any --- plpgsql doesn't deal in accesses to unknown fields
(mainly because it can't know their type, and it's a strongly typed
language). Consider plperl or plpython or pl-anything-but-pgsql.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-02-10 21:47:46 Re: createdb.exe and psql.exe without Promting Password
Previous Message Lee Hughes 2009-02-10 21:15:22 Referencing Cursor/Row/Record Fields in PL/PgSQL