Search Postgresql Archives

Re: apostrophes and psql variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux