Re: apostrophes and psql variables - Mailing list pgsql-general

From Michael Fuhr
Subject Re: apostrophes and psql variables
Date
Msg-id 20060817131527.GA90172@winnie.fuhr.org
Whole thread Raw
In response to apostrophes and psql variables  ("Ilja Golshtein" <ilejn@yandex.ru>)
List pgsql-general
On Thu, Aug 17, 2006 at 05:05:00PM +0400, Ilja Golshtein wrote:
> Is there any way to have psql variable in apostrophes?
>
> The idea is to do something like this
>
> \set var 'some value'
> insert into aaa values(:var)

test=> \set var '\'some value\''
test=> insert into aaa values (:var);
INSERT 0 1
test=> select * from aaa;
    val
------------
 some value
(1 row)

--
Michael Fuhr

pgsql-general by date:

Previous
From: "Ilja Golshtein"
Date:
Subject: apostrophes and psql variables
Next
From: "Dawid Kuroczko"
Date:
Subject: Re: Best approach for a "gap-less" sequence