CREATE TABLE test1 ( a text COLLATE "de_DE", b text COLLATE "es_ES" );
INSERT INTO test1 VALUES('b','b'), ('c','c'), ('g','g'), ('h','h'); SELECT a < (select 'foo' COLLATE "fr_FR") FROM test1;
Suggest providing a self-contained script (set echo to all and capture the output to a file), changing the table name to ensure no test pollution, and including the version of the server in one of the queries.
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...