string cast/compare broken?

Поиск
Список
Период
Сортировка
Искать
От
Scott Royston
Тема
string cast/compare broken?
Дата
Msg-id
D217A228-9517-11D6-BBE3-000393577144@mac.com
Список
Дерево обсуждения
string cast/compare broken? Scott Royston <scroyston@mac.com>
Re: string cast/compare broken? Tom Lane <tgl@sss.pgh.pa.us>
Re: string cast/compare broken? Hannu Krosing <hannu@tm.ee>
Mac OS X:
postgres% psql --version
psql (PostgreSQL) 7.2.1
contains support for: multibyte

LEDEV=# create table test1 (foo varchar(5));
CREATE
LEDEV=# create table test2 (foo char(5));
CREATE
LEDEV=# insert into test2 (foo) values ('S');
INSERT 3724249 1
LEDEV=# insert into test1 (foo) values ('S');
INSERT 3724250 1
LEDEV=# select a.foo, b.foo from test1 a, test2 b where a.foo = 
b.foo::text; foo | foo
-----+-----
(0 rows)

LEDEV=# select a.foo = 'S', b.foo = 'S' from test1 a, test2 b; ?column? | ?column?
----------+---------- t        | t
(1 row)

LEDEV=# select a.foo, b.foo from test1 a, test2 b where CAST(a.foo as 
CHAR) = b.foo; foo |  foo
-----+------- S   | S
(1 row)


В списке pgsql-hackers по дате отправления
От: Hannu Krosing
Дата:
Сообщение: Re: please help on query
От: Bruce Momjian
Дата:
FAQ