Fwd: concatenate and use as field - Mailing list pgsql-general

From Alain Roger
Subject Fwd: concatenate and use as field
Date
Msg-id 75645bbb0903290441w5f12d718naafb206c9bb8f0b5@mail.gmail.com
Whole thread Raw
In response to concatenate and use as field  (Alain Roger <raf.news@gmail.com>)
Responses Fwd: concatenate and use as field  (Alain Roger <raf.news@gmail.com>)
List pgsql-general
Hi,

i have a character varying variable and i concatenate with some other variable, using the '||' operator.
the result of this concatenation should be the name of a column in my table.

however i don't know how to tell that this new concatenated string is a column name.
how to do it ?
thanks.

in fact i'm trying to do the following thing:

select id, theme_ || $1 from themes;

and based on the parameter my stored procedure has received, it should create something like that:
select id, theme_eng from themes;

if $1 = 'eng'

pgsql-general by date:

Previous
From: Eugenio Modesti
Date:
Subject: Re: problem with locale :
Next
From: Alain Roger
Date:
Subject: Fwd: concatenate and use as field