Skip site navigation (1) Skip section navigation (2)

Re: [SQL] \set

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jie Liang" <jie(at)stbernard(dot)com>
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:05:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-adminpgsql-sql
"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;
(1 row)
			regards, tom lane

In response to

pgsql-admin by date

Next:From: LoekeDate: 2004-05-12 23:40:05
Subject: the schema public
Previous:From: Bjoern MetzdorfDate: 2004-05-12 22:40:58
Subject: Quad processor options - summary

pgsql-sql by date

Next:From: Jie LiangDate: 2004-05-12 23:40:06
Subject: Re: [SQL] \set
Previous:From: Jie LiangDate: 2004-05-12 21:59:38
Subject: Re: [SQL] \set

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group