Check encoding of postgres database 11-09-2025 SELECT datname, pg_encoding_to_char(encoding) FROM pg_database WHERE datname = 'postgres';