Re: operator dependency of commutator and negator - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: operator dependency of commutator and negator
Date
Msg-id AANLkTi=RdyHJ+JGFpRE6gHW_OP4r11VOzuoK_borLW+T@mail.gmail.com
Whole thread Raw
In response to Re: operator dependency of commutator and negator  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: operator dependency of commutator and negator
List pgsql-hackers
On Wed, Sep 29, 2010 at 11:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'm not sure that fixing this case is worth the amount of work it'd
> take.  How often do you drop just one member of a commutator pair?

I found the issue when an user tries to write a "safe" installer
script under "DROP before CREATE" coding rule:
1. DROP OPERATOR IF EXISTS <<< ... ;2. CREATE OPERATOR <<< (... COMMUTATOR >>>);3. DROP OPERATOR IF EXISTS >>> ... ;4.
CREATEOPERATOR >>> (... COMMUTATOR <<<); 

3 drops catalog-only >>> added at 2, and 4 adds a operator that
has a different oid from <<<'s commutator. The operator <<<
becomes broken state in system catalog.

Anyway, it must be a rare case, and we can just avoid the usage.

--
Itagaki Takahiro


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: recovery.conf location
Next
From: "Kevin Grittner"
Date:
Subject: Re: git diff --patience