Re: select vs varchar - Mailing list pgsql-novice

From Francisco Reyes
Subject Re: select vs varchar
Date
Msg-id 20010805180929.P36941-100000@zoraida.natserv.net
Whole thread Raw
In response to select vs varchar  (Francisco Reyes <lists@natserv.com>)
List pgsql-novice
On Sun, 5 Aug 2001, Allan Engelhardt wrote:

> Francisco Reyes wrote:
>
> > How do I do selects against varchars?
> > A "select * from <table> where <field>=<value>" doesn't seem to work.
> >
> > The same select against a char field works.
>
> What problem are you experiencing?
>      test=# create table test (text varchar);
>      CREATE
>      test=# insert into test values ('foo');
>      INSERT 12734264 1
>      test=# insert into test values ('bar');
>      INSERT 12734265 1
>      test=# select * from test where text = 'foo';
>       text
>      ------
>       foo
>      (1 row)
>

User error. :-(
The value I was using on the where clause was different from the value on
the field. After your example I took another look and found my typing
error.

thanks.


pgsql-novice by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: Indeces vs small tables
Next
From: Horst Herb
Date:
Subject: Re: nextval/dbi question