Re: BUG #13762: server will crash after superuser alter function and set client_encoding - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13762: server will crash after superuser alter function and set client_encoding
Date
Msg-id 22805.1447080354@sss.pgh.pa.us
Whole thread Raw
In response to BUG #13762: server will crash after superuser alter function and set client_encoding  (funnyxj@qq.com)
Responses =?gb18030?B?u9i4tKO6IFtCVUdTXSBCVUcgIzEzNzYyOiBzZXJ2?= =?gb18030?B?ZXIgd2lsbCBjcmFzaCBhZnRlciBzdXBlcnVzZXIg?= =?gb18030?B?YWx0ZXIgZnVuY3Rpb24gYW5kIHNldCBjbGllbnRf?= =?gb18030?B?ZW5jb2Rpbmc=?=  ("笑见江湖" <funnyxj@qq.com>)
List pgsql-bugs
funnyxj@qq.com writes:
> When superuser execute the following statements, the server will crash, it
> may be a bug.

> 1. alter function koi8r_to_utf8(integer, integer, cstring, internal,
> integer) set work_mem = default ;

That would be in the category of "don't do that".  Encoding conversion
functions are invoked using special code paths that don't support every
possible option for functions, so I'm not too surprised that this breaks
things (and I see no reason to expend effort to try to make it not be
broken).

FWIW, I can't reproduce a crash with the described case either, so
I think there's probably some additional condition required.  But
it doesn't really matter.  Mucking with the properties of built-in
functions isn't considered a supported thing to do.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: BUG #13762: server will crash after superuser alter function and set client_encoding
Next
From: digoal@126.com
Date:
Subject: BUG #13760: order by . offset .. limit bug? when order by column has same value