Select * from users WHERE upper(lastName) = upper('Pringle') - Mailing list pgsql-jdbc

From Hale Pringle
Subject Select * from users WHERE upper(lastName) = upper('Pringle')
Date
Msg-id HIEOJHJBFLIEMFCAOMOEIEMCCIAA.halepringle@yahoo.com
Whole thread Raw
In response to Re: batch example  (Thorsten Meinl <Thorsten@meinl.bnv-bamberg.de>)
Responses Re: Select * from users WHERE upper(lastName) =
Re: Select * from users WHERE upper(lastName) = upper('Pringle')
Re: Select * from users WHERE upper(lastName) = upper('Pringle')
List pgsql-jdbc
I have notices that when you want to use the upper() function, you must also
use the trim().

For example,
In a situation where a column names lastname is char(40):
SELECT * FROM users WHERE lastname = 'Pringle'   returns one row.

SELECT * FROM users WHERE UPPER(lastname) = UPPER('Pringle')   will return
zero rows.

SELECT * FROM users WHERE TRIM(UPPER(lastname) = TRIM(UPPER('Pringle'))
will return one row.

This seems odd to me.  Can someone explain?


pgsql-jdbc by date:

Previous
From: "V. Cekvenich"
Date:
Subject: Re: RowSet
Next
From: Dave Cramer
Date:
Subject: Re: Sequence