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