Re: [GENERAL] Referencing Cursor/Row/Record Fields in PL/PgSQL

2009-02-11 Thread Pavel Stehule
2009/2/11 Lee Hughes : > 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. > you don't need temp. table. If you know fix sets of columns. Attentions. These

Re: [GENERAL] Referencing Cursor/Row/Record Fields in PL/PgSQL

2009-02-11 Thread Lee Hughes
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 On Tue, Feb 10, 2009 at 8:21 PM, Pavel Stehule wrote: > Hello > > 2009/2/11 Lee H

Re: [GENERAL] Referencing Cursor/Row/Record Fields in PL/PgSQL

2009-02-10 Thread Pavel Stehule
Hello 2009/2/11 Lee Hughes : > 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

Re: [GENERAL] Referencing Cursor/Row/Record Fields in PL/PgSQL

2009-02-10 Thread Lee Hughes
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? On Tue, Feb 10, 2009 at 1:22 PM, Tom Lane wrote: > Lee Hughes writes: > > Trying to figure out how to reference a

Re: [GENERAL] Referencing Cursor/Row/Record Fields in PL/PgSQL

2009-02-10 Thread Tom Lane
Lee Hughes 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 doe

[GENERAL] Referencing Cursor/Row/Record Fields in PL/PgSQL

2009-02-10 Thread Lee Hughes
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. I've studied the manual and tried using EXECUTE to no avail.