++ PLPGSQL - Mailing list pgsql-general

From Shaun Clements
Subject ++ PLPGSQL
Date
Msg-id 100F78F2B203444BB161BBA7077FF6131CD970@srldbexc003.relyant.co.za
Whole thread Raw
Responses Re: ++ PLPGSQL
List pgsql-general

Adding to that.

Can you assign the value of a dynamic record value.
For example

If I have written dataset returned, into a record.
I now want to call on a particular column value from the first row.
The column name is dynamic.
Can I use something like this

sales_month1_x := RECORDNAME.quote_ident('month1_'||quote_literal(yr2));

Where the value of
RECORDNAME.month1_2004
is assigned to sales_month1_x

Is this possible.
It doesnt look right, in that I have referenced RECORDNAME.quote_ident
That should bomb out..
how would I reference the dynamic column of the record.

Thanks in advance.

Kind Regards,
Shaun Clements

pgsql-general by date:

Previous
From: Shaun Clements
Date:
Subject: PLPGSQL
Next
From: Marco Colombo
Date:
Subject: Re: multi line text data/query ?bug?