PLPGSQL - Mailing list pgsql-general

From Shaun Clements
Subject PLPGSQL
Date
Msg-id 100F78F2B203444BB161BBA7077FF6131CD96F@srldbexc003.relyant.co.za
Whole thread Raw
List pgsql-general

Hi All

Im trying to assign the value of a dynamic variable, to a variable.
How is this done in PostgresQL. Is this allowed in Postgres Procedural Language

Here is my attempt.

variable1:= quote_ident('variable_'||quote_literal(year));

Where the variable is called
variable_2004
where name, represents the year

RESULT WANTED:  variable1 gets assigned the value of variable_2004.

Any help is appreciated.Thanks

Kind Regards,
Shaun Clements

pgsql-general by date:

Previous
From: Klint Gore
Date:
Subject: Re: inherited table and rules
Next
From: Shaun Clements
Date:
Subject: ++ PLPGSQL