Operation eq with varchar

From: t(dot)ngockhoi(at)bpf(dot)vnu(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Operation eq with varchar
Date: 2001-12-20 08:38:15
Message-ID: C1256B28.002F7341.00@bpfn01.bpf.vnu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

HI ALL,

I don't no why i can't compare varchar with string const :

CREATE TABLE XXX (
id integer,
stvarchar varchar
) ;

SELECT * FROM XXX WHERE stvarchar = 'somestring' ;

I can only use like operator :

SELECT * FROM XXX WHERE stvarchar like 'somestring%' ;

Any body know why ?

I have the 7.1.3 verion in redhat 7.2

Best Regards,
Ngoc-Khoi TO.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2001-12-20 09:19:11 Re: Operation eq with varchar
Previous Message Francisco Reyes 2001-12-20 00:37:54 Re: copy vs. insert w/ no autocommit