Re: [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator
Дата
Msg-id 10336.1458754912@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Mar 23, 2016 at 12:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm also a bit dubious of the assumption in RemoveOperatorById that an
>> operator can't be its own negator.  Yeah, that should not be the case,
>> but if it is the case the deletion will fail outright.

> So what?  We've never guaranteed that things are going to work if you
> start by corrupting the catalogs, and I wouldn't pick this as a place
> to start.

I would not be worried except that it breaks a case that used to work,
as your test below demonstrates.

>> We could resolve both of these issues by changing the semantics of
>> OprUpdate so that it unconditionally does a CommandCounterIncrement
>> after each update that it performs.  IMO that would be a lot simpler
>> and more bulletproof; it'd allow removal of a lot of these
>> overly-tightly-reasoned cases.

> I tried this, but it did not seem to work.

Odd.  If you post the revised patch, I'll try to chase down what's wrong.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL 9.6 behavior change with set returning (funct).*
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: NOT EXIST for PREPARE