PLPGSQL

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

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Clements 2005-03-23 09:22:23 ++ PLPGSQL
Previous Message Klint Gore 2005-03-23 07:34:01 Re: inherited table and rules