Re: [SQL] \set

From: "Jie Liang" <jie(at)stbernard(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Christian Kratzer" <ck(at)cksoft(dot)de>, <pgsql-admin(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] \set
Date: 2004-05-12 23:40:06
Message-ID: E7E213858379814A9AE48CA6754F5ECB363374@mail01.stbernard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Thank you, Tom.

Jie

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, May 12, 2004 4:06 PM
To: Jie Liang
Cc: Christian Kratzer; pgsql-admin(at)postgresql(dot)org;
pgsql-sql(at)postgresql(dot)org
Subject: Re: [ADMIN] [SQL] \set

"Jie Liang" <jie(at)stbernard(dot)com> 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=# select :AAA;
?column?
----------
whatever
(1 row)

regards, tom lane

Browse pgsql-admin by date

  From Date Subject
Next Message Steve Lane 2004-05-13 00:15:43 Re: RAM usage per connection
Previous Message Loeke 2004-05-12 23:40:05 the schema public

Browse pgsql-sql by date

  From Date Subject
Next Message William Anthony Lim 2004-05-13 05:25:24 Re: working with schema
Previous Message Tom Lane 2004-05-12 23:05:37 Re: [SQL] \set