Re: operator dependency of commutator and negator

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: operator dependency of commutator and negator
Date: 2010-09-29 15:05:37
Message-ID: AANLkTi=RdyHJ+JGFpRE6gHW_OP4r11VOzuoK_borLW+T@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 29, 2010 at 11:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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. CREATE OPERATOR >>> (... 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-09-29 15:10:58 Re: git diff --patience
Previous Message Robert Haas 2010-09-29 15:02:47 Re: recovery.conf location