Re: Column names as variables in plpgsql - Mailing list pgsql-novice

From A. Kretschmer
Subject Re: Column names as variables in plpgsql
Date
Msg-id 20060703050003.GA4905@webserv.wug-glas.de
Whole thread Raw
In response to Column names as variables in plpgsql  ("Derrick Betts" <derrick@blueaxis.com>)
List pgsql-novice
am  30.06.2006, um 16:32:38 -0600 mailte Derrick Betts folgendes:
> Is it possible to assign a column name to a variable and then use that
> variable in a SELECT statement inside a function using plpgsql?

Yes. You can define a string with your SQL, including variables. Thena
you can EXECUTE this string.

http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

pgsql-novice by date:

Previous
From: "Guido Barosio"
Date:
Subject: Re: Password Help?
Next
From: "Derrick Betts"
Date:
Subject: Re: Column names as variables in plpgsql