Re: operator dependency of commutator and negator, redux

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: operator dependency of commutator and negator, redux
Дата
Msg-id 12166.1356018721@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: operator dependency of commutator and negator, redux  (Brendan Jurd <direvus@gmail.com>)
Ответы Re: operator dependency of commutator and negator, redux
Список pgsql-hackers
Brendan Jurd <direvus@gmail.com> writes:
> On 20 December 2012 11:51, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> While reconsidering the various not-too-satisfactory fixes we thought of
>> back then, I had a sudden thought.  Instead of having a COMMUTATOR or
>> NEGATOR forward reference create a "shell" operator and link to it,
>> why not simply *ignore* such references?  Then when the second operator
>> is defined, go ahead and fill in both links?

> Ignore with warning sounds pretty good.  So it would go something like this?

> # CREATE OPERATOR < (... COMMUTATOR >);
> WARNING: COMMUTATOR > (foo, foo) undefined, ignoring.
> CREATE OPERATOR

> # CREATE OPERATOR > (... COMMUTATOR <);
> CREATE OPERATOR

I was thinking a NOTICE at most.  If it's a WARNING then restoring
perfectly valid pg_dump files will result in lots of scary-looking
chatter.  You could make an argument for printing nothing at all,
but that would probably mislead people who'd fat-fingered their
COMMUTATOR entries.
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Parser Cruft in gram.y
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Set visibility map bit after HOT prune