Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8r5p-0006BT-Br for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Jul 2022 22:32:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o8r5n-0002eV-GS for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Jul 2022 22:32:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8r5n-0002eM-8F for pgsql-bugs@lists.postgresql.org; Tue, 05 Jul 2022 22:32:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8r5l-0002mz-4T for pgsql-bugs@lists.postgresql.org; Tue, 05 Jul 2022 22:32:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 265MWMd82029910; Tue, 5 Jul 2022 18:32:23 -0400 From: Tom Lane To: d.koval@postgrespro.ru cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17539: Assert after CREATE OPERATOR CLASS command In-reply-to: <17539-37e89c604ebc0e02@postgresql.org> References: <17539-37e89c604ebc0e02@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 05 Jul 2022 20:08:35 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2029908.1657060342.1@sss.pgh.pa.us> Date: Tue, 05 Jul 2022 18:32:22 -0400 Message-ID: <2029909.1657060342@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > CREATE FUNCTION my_int4_sort(int4,int4) RETURNS int LANGUAGE sql > AS $$ SELECT CASE WHEN $1 = $2 THEN 0 WHEN $1 > $2 THEN 0 ELSE -1 END; > $$; > CREATE OPERATOR CLASS test_int4_ops FOR TYPE int4 USING btree AS > OPERATOR 5 > (int4,int4), FUNCTION 1 my_int4_sort(int4,int4); This is a broken operator class definition (it's missing most of the expected operators for a btree opclass). It's not exactly surprising that it causes problems. I have zero desire to try to make the system bulletproof against incorrectly-made opclasses. regards, tom lane