| От | Laurenz Albe |
|---|---|
| Тема | Re: PostgreSQL, change encoding preserving data |
| Дата | |
| Msg-id | eaed12d75cc4a053c0e266901787b5dda6f69dbc.camel@cybertec.at обсуждение исходный текст |
| Ответ на | PostgreSQL, change encoding preserving data (info@denisgottardello.it) |
| Список | pgsql-admin |
On Thu, 2023-02-23 at 14:00 +0100, info@denisgottardello.it wrote:
> Hi, my database is setup with encoding= win1252. In order to go to utf8 I run the followed query:
>
> update pg_database set encoding= pg_char_to_encoding('utf8') where datname= 'Handyman'
>
> The problem is that, the database has already got data with special characters such
> as "àòèé". After having executed the query to change the encoding to utf8, I can't read the special caracters.
> Is there a way to change the encoding and to migtrate the data?
Congratulations, you have broken your database.
Undo that change right away. Don't update catalog tables.
The only way to do that is dump/restore.
Yours,
Laurenz Albe
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера