Re: BUG #17539: Assert after CREATE OPERATOR CLASS command - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17539: Assert after CREATE OPERATOR CLASS command
Date
Msg-id 2029909.1657060342@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17539: Assert after CREATE OPERATOR CLASS command  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17539: Assert after CREATE OPERATOR CLASS command  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> 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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower
Next
From: Michael Paquier
Date:
Subject: Re: BUG #17539: Assert after CREATE OPERATOR CLASS command