Re: Bug in either collation docs or code

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: Bug in either collation docs or code
Дата
Msg-id CAAKRu_awoyXhb9UF2HiLDpe0J-jYThaEyZoVb8=aQdR2ZYBjwg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bug in either collation docs or code  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Bug in either collation docs or code  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


I did my test on 9.6.5 ​(Ubuntu 16.04) with:

CREATE TABLE test_col (
    a text COLLATE "en_CA.utf8",
    b text COLLATE "en_US.utf8"
);
INSERT INTO test_col VALUES ('A', 'A');
SELECT a < (SELECT 'foo'::text COLLATE "en_GB.utf8") FROM test_col;

SQL Error: ERROR:  could not determine which collation to use for string comparison
HINT:  Use the COLLATE clause to set the collation explicitly.

Note, I had to include the cast to text in order for the query to execute...

David J.


On postgres built off of master on my mac (sierra), the following is the output:

DROP TABLE IF EXISTS test_col_mac;
DROP TABLE
CREATE TABLE test_col_mac (
    a text COLLATE "de_DE",
    b text COLLATE "es_ES"
);
CREATE TABLE
INSERT INTO test_col_mac VALUES('A','A');
INSERT 0 1
SELECT a < (SELECT 'foo'::TEXT COLLATE "fr_FR") FROM test_col_mac;
 ?column?
----------
 t
(1 row)


--
Melanie Plageman

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Needless additional partition check in INSERT?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Needless additional partition check in INSERT?