Search Postgresql Archives

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

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

 



Hello

2009/2/11 Lee Hughes <lee@xxxxxxxxxxxx>:
> I thought that's what EXECUTE was for in plpgsql -- isn't there a way to
> extract the value of a field in a row/record variable by building a SELECT
> string and passing it to EXECUTE?
>

not in plpgsql. Try, plperl or some synamic PL language, please

regards
Pavel Stehule

> On Tue, Feb 10, 2009 at 1:22 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>>
>> Lee Hughes <lee@xxxxxxxxxxxx> 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
>
>
>

-- 
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