Re: Problem with sql function LOWER

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Th Templ" <templ_th(at)hotmail(dot)com>
Cc: SBrett(at)e-mis(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with sql function LOWER
Date: 2002-07-03 15:56:46
Message-ID: 25264.1025711806@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Th Templ" <templ_th(at)hotmail(dot)com> writes:
> SELECT Nom,Prenom from personne where
> LOWER(Nom)='test';

I'm guessing that Nom is of type char(N) and therefore has padding
spaces in it. You should use varchar or text instead of char to
avoid this sort of difficulty.

regards, tom lane

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2002-07-03 16:23:17 Re: switching db's on the fly
Previous Message Jean-Luc Lachance 2002-07-03 15:05:46 Re: Problem with sql function LOWER