Semantics of LIKE

From: Craig Johannsen <cjohan(at)home(dot)com>
To: pgsql-sql(at)hub(dot)org
Subject: Semantics of LIKE
Date: 1999-03-02 06:02:43
Message-ID: 36DB7F03.E3750759@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

How does the LIKE predicate operator treat trailing spaces
in a CHAR column. For example,
create table test(c1 char(5));
insert into test('abc');
select c1 from test where c1 like 'abc%';
should retrieve one row.
select c1 from test where c1 like 'abc';
should retrieve zero rows.
select c1 from test where c1 like 'abc ';
should retrieve one row.

Correct? Does this conform exactly to the SQL 92 spec?

Browse pgsql-sql by date

  From Date Subject
Next Message CIMPOESU Teodor 1999-03-02 10:11:10 Persistent connection in PostGresSQL
Previous Message Stan Brown 1999-03-02 04:35:57 Staus of Primary/Foreign key?