Re: Referencing Cursor/Row/Record Fields in PL/PgSQL
От | Lee Hughes |
---|---|
Тема | Re: Referencing Cursor/Row/Record Fields in PL/PgSQL |
Дата | |
Msg-id | 2d739b560902110842g5ce281d8pdb865b4cb0965c76@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Referencing Cursor/Row/Record Fields in PL/PgSQL (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: Referencing Cursor/Row/Record Fields in PL/PgSQL
|
Список | pgsql-general |
I got it to work in plpgsql through the use of pg_attribute and a temporary table with known field names like "field0", "field1", etc. Works very nicely and performance seems fine so far.
Thanks for your help.
Lee
Thanks for your help.
Lee
On Tue, Feb 10, 2009 at 8:21 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
2009/2/11 Lee Hughes <lee@hughesys.com>:> I thought that's what EXECUTE was for in plpgsql -- isn't there a way tonot in plpgsql. Try, plperl or some synamic PL language, please
> extract the value of a field in a row/record variable by building a SELECT
> string and passing it to EXECUTE?
>
regards
Pavel Stehule
> On Tue, Feb 10, 2009 at 1:22 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> Lee Hughes <lee@hughesys.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
>
>
>
В списке pgsql-general по дате отправления: