Reputation: 565
I have one query, which returns different results on different servers.
select ' s' > '.'
First server return true, second - false. What the are the settings that can cause this?
Upvotes: 1
Views: 57
Reputation: 175676
Your DBs have different COLLATION:
The collation feature allows specifying the sort order and character classification behavior of data per-column, or even per-operation. This alleviates the restriction that the LC_COLLATE and LC_CTYPE settings of a database cannot be changed after its creation.
select name, setting
from pg_settings
where name in ('lc_collate', 'server_encoding', 'client_encoding');
-- explicit collation
select ' s' COLLATE "POSIX" > '.' COLLATE "POSIX"
Upvotes: 1