Hi,
On Tue, 11 May 2004, Jie Liang wrote:
Hi,
How to use an internal variable?
Original question was how to set a variable in postgresql?
If I want to set a variable like start_date='2004-05-10';
How could I use it in my SQL statement?
E.g.
Db set start_date '2004-05-10'
Db select start_date as
Jie Liang [EMAIL PROTECTED] writes:
You will see AAA associate with 'whatever', it's an internal variable,
but how could I use it in my SQL query?
regression=# \set AAA 'whatever'
regression=# select :AAA;
ERROR: column whatever does not exist
regression=# \set AAA '\'whatever\''
regression=#
Thank you, Tom.
Jie
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 4:06 PM
To: Jie Liang
Cc: Christian Kratzer; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [ADMIN] [SQL] \set
Jie Liang [EMAIL PROTECTED] writes:
You will see AAA