How to check the encoding for a database in PostgreSQL

H

To do this login to the command line and switch to the main Postgres user. eg su postgres

The type the psql -l command this will produce a list of databases with there encodings

 
	                List of databases
 
	          Name          |   Owner    | Encoding  
 
	------------------------+------------+-----------
 
	 DB1                    | postgres   | UTF8
 
	 DB2                    | postgres   | UTF8
 
	 DB3                    | postgres   | UTF8
 
	 DB4                    | clicks     | SQL_ASCII
 
	 DB5                    | clicks     | SQL_ASCII

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me