From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Bug in either collation docs or code |
Date: | 2018-06-08 16:51:37 |
Message-ID: | CAAKRu_awoyXhb9UF2HiLDpe0J-jYThaEyZoVb8=aQdR2ZYBjwg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-06-08 16:52:47 | Re: Needless additional partition check in INSERT? |
Previous Message | David Rowley | 2018-06-08 16:43:08 | Re: Needless additional partition check in INSERT? |