Re: Add ENCODING option to COPY
От | Tom Lane |
---|---|
Тема | Re: Add ENCODING option to COPY |
Дата | |
Msg-id | 17784.1296491138@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Add ENCODING option to COPY (Hitoshi Harada <umi.tanuki@gmail.com>) |
Ответы |
Re: Add ENCODING option to COPY
|
Список | pgsql-hackers |
Hitoshi Harada <umi.tanuki@gmail.com> writes: > Finally I concluded the concern Itagaki-san raised can be solved by > adding code that restores client_encoding in copy_in_error_callback. That seems like an absolutely horrid idea. Error context callbacks should not have side-effects like that. They're not guaranteed to be called at all, let alone in any particular order. In this case I'd also be worried that the state needs to be fixed before elog.c reaches the point of calling the callbacks --- there's nothing to say that it might not try to translate some strings to the client encoding earlier than that. It might happen to work today (or at least in the scenarios you tested), but it seems fragile as can be. regards, tom lane
В списке pgsql-hackers по дате отправления: