Re: select vs varchar

From: Francisco Reyes <lists(at)natserv(dot)com>
To: Allan Engelhardt <allane(at)cybaea(dot)com>
Cc: Pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: select vs varchar
Date: 2001-08-05 22:15:45
Message-ID: 20010805180929.P36941-100000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-novice by date

  From Date Subject
Next Message Horst Herb 2001-08-05 22:34:06 Re: nextval/dbi question
Previous Message Francisco Reyes 2001-08-05 22:04:22 Re: Indeces vs small tables