From: KÖPFERL Robert <robert.koepferl@sonorys.at>
To: 'bandeng' <postgredb@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: postgre variable
Date: Thu, 19 May 2005 11:11:48 +0200
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16701@neptun.sonorys.at> (raw)
You should considder a variation as Volkan suggested.
Otherwise the EXECUTE command might be what you are looking for.
Execute a sql made up in a string
|-----Original Message-----
|From: bandeng [mailto:postgredb@gmail.com]
|Sent: Donnerstag, 19. Mai 2005 04:11
|To: pgsql-sql@postgresql.org
|Subject: [SQL] postgre variable
|
|
|hello all,
|
|i want to make dynamic sql query like this
|
|select * from tb_cust where name='erick' and age='20'
|
|to
|
|select * from tb_cust $1
|
|i have tried but error comeup
|
|any suggestion?
|
|thanks
|Ricky
|--
|Gutten Aben Sugeng Sonten, Jangane Kurang Santen
|bandeng....................
|
|---------------------------(end of
|broadcast)---------------------------
|TIP 9: the planner will ignore your desire to choose an index
|scan if your
| joining column's datatypes do not match
|
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: robert.koepferl@sonorys.at, postgredb@gmail.com
Subject: Re: postgre variable
In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB16701@neptun.sonorys.at>
References: <ED4E30DD9C43D5118DFB00508BBBA76EB16701@neptun.sonorys.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox