Re: Change server encoding after the fact
| От | Tom Lane |
|---|---|
| Тема | Re: Change server encoding after the fact |
| Дата | |
| Msg-id | 11616.1317411203@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Change server encoding after the fact (Cody Caughlan <toolbag@gmail.com>) |
| Список | pgsql-general |
Cody Caughlan <toolbag@gmail.com> writes: > Ok, I see what you mean. This would create a new DB with the proper > encoding. Which is "fine", and probably what I will do. I guess I see an > ideal scenario being one where we permanently convert the template encoding > to UTF8 so going forward I dont have to worry about forgetting to adding the > encoding= 'UTF8' for every new DB I create. Well, if you're feeling brave you can mark template0 as having utf8 encoding via a manual update to pg_database. In theory that should be safe enough. If you know template1 doesn't, and never has, contained any non-ASCII data, you could do the same to it ... but it would be a lot safer to drop it and recreate from template0. See http://wiki.postgresql.org/wiki/Adventures_in_PostgreSQL,_Episode_1 for some context. regards, tom lane
В списке pgsql-general по дате отправления: