LIKE, "=" and fixed-width character fields - Mailing list pgsql-general

From Dmitry Teslenko
Subject LIKE, "=" and fixed-width character fields
Date
Msg-id 91325fec0811100622wba49e85n86df222565df4584@mail.gmail.com
Whole thread Raw
Responses Re: LIKE, "=" and fixed-width character fields
List pgsql-general
Hello!
There's table:
CREATE TABLE table1 (
    field1 CHARACTER(10),
    ...
);

Then there's record: INSERT INTO table1(field1, ..) VALUES ('111', ...);

Then I query it:
SELECT * FROM table1 WHERE field1 <operator> '111';

When <operator> is LIKE no records matches query, when <operator> is =
my record matches query. Why? And Does this behavior varies from
PostgreSQL 7.4 to 8.1?

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

pgsql-general by date:

Previous
From: "Tony Fernandez"
Date:
Subject: Upgrading Postgres question
Next
From: Bruno Lavoie
Date:
Subject: Re: Importing text file into a TEXT field