Check PostgreSQL Table Character Set

To check the character set of a PG database table, you can use the following command:

SELECT
  tablename,
  column_name,
  character_set_name
FROM
  information_schema.columns
WHERE
  table_schema = 'public'
  AND table_catalog = 'your_database_name'
ORDER BY
  tablename,
  column_name;

This SQL query will retrieve character set information for all tables in the database, including table names, column names, and character set names. Simply replace your_database_name with the actual name of the database you want to query.

bannerAds