Sunday, December 24, 2006

Creating PostgreSQL datase with custom encoding

To create a database with custom encoding, su as postgres user su - postgres and login into PostgreSQL terminal.

psql template1 postgres

and execute the following SQL command to create the db:
create database username_dbname with owner=username encoding='ENCODING_NAME';

If you get the "CREATE DATABASE" message and no errors, all is ok and you can logout from the terminal by inputing '\q'.

No comments: