get collation postgresql code example Example: how to find database collation in postgres select datname, datcollate from pg_database;