Saturday, March 29. 2008How do you rename a databasePrinter FriendlyTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Hi,
My problem is to change the encoding of a running database without backup, modify and restore. Any solution ? Thanks for your journal, it's great. Fabrice.
Fabrice,
Unfortunately I don't think there is a way to change the server encoding of a database without a dump reload, however you can change the default client encoding of a database without a dump restore (although not all client encodings are compatible with each server encoding). There is an automatic conversion from client to server encoding when they are compatible. To change default client encoding of a database, you would do something like ALTER DATABASE somedb SET client_encoding=latin1; OR ALTER DATABASE some SET client_encoding=utf8; All the valid encodings are listed here http://www.postgresql.org/docs/8.3/static/multibyte.html
i have a similar problem because my database use iso 8859-1 and in cpanel all i only can create dabase with utf8, to solve this problem i change the encoding of my conection in php using the comand
ALTER DATABASE somedb SET client_encoding=latin1; and it's work great. |
Entry's LinksQuicksearchCalendar
Categories
Blog Administration |