pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: d.koval@postgrespro.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17539: Assert after CREATE OPERATOR CLASS command
Date: Tue, 05 Jul 2022 18:32:22 -0400
Message-ID: <2029909.1657060342@sss.pgh.pa.us> (raw)
In-Reply-To: <17539-37e89c604ebc0e02@postgresql.org>
References: <17539-37e89c604ebc0e02@postgresql.org>

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





view thread (5+ messages)  latest in thread

Message-ID: <2029909.1657060342@sss.pgh.pa.us>
Permalink:  ../2029909.1657060342@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2029909.1657060342@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, d.koval@postgrespro.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17539: Assert after CREATE OPERATOR CLASS command
  In-Reply-To: <2029909.1657060342@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox