Pradnya
Pradnya

Reputation: 669

Check if DB is developed using unicode

How do we check if the database is unicode. I am using postgresql and I need to know if it is unicode.

Thank You

Upvotes: 0

Views: 2164

Answers (1)

Craig Ringer
Craig Ringer

Reputation: 324731

There's no such thing as "developed using" unicode.

If you want to know the database encoding, use:

SELECT current_setting('server_encoding');

which reports the database encoding of the current database. Or to get it for any database:

select pg_catalog.pg_encoding_to_char(d.encoding) 
from pg_database d
where datname = 'mydatabase';

You might also be interested in the collation, see psql's \l output for details, and to see the query that produces it run psql -E then \l.

Upvotes: 5

Related Questions