Re: quoted variables in pgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: chester c young <chestercyoung(at)yahoo(dot)com>
Cc: sql pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: quoted variables in pgsql
Date: 2007-01-05 03:26:08
Message-ID: 9089.1167967568@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

chester c young <chestercyoung(at)yahoo(dot)com> writes:
> cannot get those quotes around the value.

Use backslashes.

regression=# \set var '\'value\''
regression=# \echo :var
'value'

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Travis Whitton 2007-01-05 18:29:39 Re: How to reduce a database
Previous Message chester c young 2007-01-05 03:21:03 quoted variables in pgsql