Re: Operation eq with varchar

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: t(dot)ngockhoi(at)bpf(dot)vnu(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Operation eq with varchar
Date: 2001-12-20 09:19:11
Message-ID: 20011220201911.B20560@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 20, 2001 at 09:38:15AM +0100, t(dot)ngockhoi(at)bpf(dot)vnu(dot)com wrote:
>
>
>
> HI ALL,
>
> I don't no why i can't compare varchar with string const :
>
> SELECT * FROM XXX WHERE stvarchar = 'somestring' ;

Does this work? (Untested)

SELECT * FROM XXX WHERE stvarchar = 'somestring'::varchar ;

HTH,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org>
http://svana.org/kleptog/
> Terrorists can only take my life. Only my government can take my freedom.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard NAGY 2001-12-20 12:52:14 strange problem with plpgsql
Previous Message t.ngockhoi 2001-12-20 08:38:15 Operation eq with varchar