ERROR: could not determine which collation to use for string comparison

Started by Andreas Joseph Kroghover 5 years ago2 messages
#1Andreas Joseph Krogh
andreas@visena.com

Guys; This errors out with:

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

The database is init'ed with:
initdb -D $PGDATA -E utf8 --locale=nb_NO.UTF-8

13-dev HEAD as of 8128b0c152a67917535f50738ac26da4f984ddd9

Works fine in <= 12

===========================

create table person( id serial primary key, firstname varchar, lastname varchar
);insert into person(firstname, lastname) values ('Andreas', 'Krogh'); CREATE
OR REPLACE FUNCTIONconcat_lower(varchar, varchar) RETURNS varchar AS $$ SELECT
nullif(lower(coalesce($1, '')) || lower(coalesce($2, '')), '') $$ LANGUAGE SQL
IMMUTABLE; select * from person pers ORDER BY concat_lower(pers.firstname,
pers.lastname)ASC; ===========================

--
Andreas Joseph Krogh

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Joseph Krogh (#1)
Re: ERROR: could not determine which collation to use for string comparison

Andreas Joseph Krogh <andreas@visena.com> writes:

Guys; This errors out with:
ERROR: could not determine which collation to use for string comparison
HINT: Use the COLLATE clause to set the collation explicitly.

Fixed, thanks for the report.

regards, tom lane