Re: Another OPERATOR bug??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Pgsql-Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Another OPERATOR bug??
Date: 2000-12-20 18:00:02
Message-ID: 5759.977335202@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Here, we've just dropped the testttype that the operator ^^^ uses. This
> does not cause the operator to be deleted, it simply reverts its left and
> right args to 'NONE'.

No, it doesn't "revert the types to NONE", because there isn't any such
type as NONE. What you've got is an operator whose argument types refer
to a nonexistent type OID. You won't be able to drop it with DROP
OPERATOR because you can't name the now-gone type.

There's been talk of having interlocks that prevent you from dropping
a still-referenced type, function, etc, but they're not there now.
I'd suggest cleaning up by executing commands like

delete from pg_operator where oprleft = oid-of-vanished-type

(if you don't know what the type's oid was, a little crosschecking of
pg_operator against pg_type will tell you).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-12-20 18:02:10 Re: Re: Generating HISTORY file
Previous Message Tom Lane 2000-12-20 17:51:58 Re: Bug in CREATE OPERATOR