Re: Char = varchar

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Glen Parker" <glenebob(at)nwlink(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Char = varchar
Date: 2002-06-04 23:34:26
Message-ID: 20079.1023233666@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Glen Parker" <glenebob(at)nwlink(dot)com> writes:
> ERROR: Unable to identify an operator '=' for types 'character' and
> 'character varying'

The reason it's unhappy is that it has no reasonable way to make a
choice between using char and varchar comparison (which are not the
same; the former is insensitive to trailing blanks). You need a
cast to tell it what to do.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Booth, Robert 2002-06-04 23:37:07 Re: Lost Access To Table
Previous Message Tom Lane 2002-06-04 23:28:03 Re: Lost Access To Table