How can i change database encoding for a PostgreSQL database using sql or phpPgAdmin?
Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up
Join them; it only takes a minute:
You have to perform:
Changing it on-the-fly isn't possible as it would require rewriting most of internal database data which is almost equal to recreating db way I described. |
|||||||||||||||||||||
|
You can change encoding on the fly without dump/restore:
|
|||||||||||||
|
To expand on the answers given, you can use these commands to accomplish your task.
Dumping database: http://www.postgresql.org/docs/9.4/static/backup-dump.html Creating database: http://www.postgresql.org/docs/9.4/static/sql-createdatabase.html This is a list of all encodings available for version 9.4: http://www.postgresql.org/docs/9.4/static/multibyte.html#MULTIBYTE-CHARSET-SUPPORTED |
|||||
|