"Bruno Scovoli Santos" <bruno.scov...@gmail.com> writes:
> brunodb=# \set nom 'Intel'
> euclidhardware=# select * from fabricantes where nome like :nom;
> ERROR:  column "intel" does not exist
> LINE 1: select * from fabricantes where nome like Intel;

If you want to put quotes in the value of a variable, you need
this
\set nom '''Intel'''
or this
\set nom '\'Intel\''
the same as you would to write a string literal containing quotes
in SQL.

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to