++ PLPGSQL

From: Shaun Clements <ShaunC(at)relyant(dot)co(dot)za>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: ++ PLPGSQL
Date: 2005-03-23 09:22:23
Message-ID: 100F78F2B203444BB161BBA7077FF6131CD970@srldbexc003.relyant.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2005-03-23 09:50:09 Re: multi line text data/query ?bug?
Previous Message Shaun Clements 2005-03-23 09:15:49 PLPGSQL