LIKE, "=" and fixed-width character fields

Поиск
Список
Период
Сортировка
От Dmitry Teslenko
Тема LIKE, "=" and fixed-width character fields
Дата
Msg-id 91325fec0811100622wba49e85n86df222565df4584@mail.gmail.com
обсуждение исходный текст
Ответы Re: LIKE, "=" and fixed-width character fields  (Richard Huxton <dev@archonet.com>)
Список 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 по дате отправления:

Предыдущее
От: "Tony Fernandez"
Дата:
Сообщение: Upgrading Postgres question
Следующее
От: Bruno Lavoie
Дата:
Сообщение: Re: Importing text file into a TEXT field