Re: BUG #17539: Assert after CREATE OPERATOR CLASS command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: d(dot)koval(at)postgrespro(dot)ru
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17539: Assert after CREATE OPERATOR CLASS command
Date: 2022-07-05 22:32:22
Message-ID: 2029909.1657060342@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-07-06 01:05:04 Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Previous Message PG Bug reporting form 2022-07-05 22:13:15 BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower