views:

2522

answers:

1

How can i change database encoding for a PostgreSQL database using sql or phpPgAdmin?

+8  A: 

You have to perform:

  1. database dump,
  2. delete database,
  3. create database with new encoding,
  4. import data from dump created in point 1.

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.

romke
+1 I came here to say this.
Paul Tomblin
i have a cpanel account and if i backup the database i will be able to restore only the content and not to recreate database with new encoding
daniels
drop = delete, here's link to cpanel docs:http://www.cpanel.net/support/docs/11/cpanel/databases_delete_post.html
romke