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