Re: Re: [BUGS] 回复: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding
От | Tom Lane |
---|---|
Тема | Re: Re: [BUGS] 回复: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding |
Дата | |
Msg-id | 15569.1447128876@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [BUGS] 回复: [BUGS] BUG #13762: server will crash after superuser alter function and set client_encoding (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
=?gb18030?B?u9i4tKO6IFtCVUdTXSAgUmU6IFtCVUdTXSC72Li0?=
=?gb18030?B?o7ogW0JVR1NdIEJVRyAjMTM3NjI6IHNlcnZlciB3?=
=?gb18030?B?aWxsIGNyYXNoIGFmdGVyIHN1cGVydXNlciBhbHRl?=
=?gb18030?B?ciBmdW5jdGlvbiBhbmQgc2V0IGNsaWVudF9lbmNv?=
=?gb18030?B?ZGluZw==?=
|
Список | pgsql-bugs |
Michael Paquier <michael.paquier@gmail.com> writes: > On Tue, Nov 10, 2015 at 9:51 AM, 笑见江湖 <funnyxj@qq.com> wrote: >> Sorry, the correct statements which make server crash is: >> >> 1. alter function koi8r_to_utf8(integer, integer, cstring, internal, >> integer) set work_mem = '4MB'; >> 2. set client_encoding = 'koi8'; >> 3. select 1; > This indeed crashes, and that's not limited to this particular > function, try for example iso8859_to_utf8 with ISO_8859_6 as > client_encoding on even a different parameter for the same result. > FWIW, here is a backtrace with assertions enabled: Yeah... if you trace through this, you'll notice that (1) calling a function having non-null proconfig requires fetching its pg_proc entry, and (2) fetching anything from a catalog requires being inside a live transaction, and (3) the client/server encoding translation functions have to be invokable outside any transaction. So as I said, this is not going to work and we are not very interested in making it work. regards, tom lane
В списке pgsql-bugs по дате отправления: