"Bruno Scovoli Santos" <bruno(dot)scovoli(at)gmail(dot)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