Re: factorial function/phase out postfix operators?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: factorial function/phase out postfix operators?
Дата
Msg-id 27490.1589896296@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: factorial function/phase out postfix operators?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: factorial function/phase out postfix operators?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I think it's generally a good idea, though perhaps we should consider
> continuing to allow '!' as a postfix operator and just removing
> support for any other.

Uh ... what exactly would be the point of that?  The real reason to do
this at all is not that we have it in for '!', but that we want to
drop the possibility of postfix operators from the grammar altogether,
which will remove a boatload of ambiguity.

> I won't lose a lot of sleep if we decide to rip out '!' as well, but I
> don't think that continuing to support it would cost us much.

AFAICS, it would cost us the entire point of this change.

In my non-caffeinated state, I don't recall exactly which things are
blocked by the existence of postfix ops; but I think for instance it might
become possible to remove the restriction of requiring AS before column
aliases that happen to be unreserved keywords.

If we lobotomize CREATE OPERATOR but don't remove built-in postfix
ops, then none of those improvements will be available.  That seems
like the worst possible choice.

I would also argue that having a feature that is available to
built-in operators but not user-defined ones is pretty antithetical
to Postgres philosophy.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Expand the use of check_canonical_path() for more GUCs
Следующее
От: Atsushi Torikoshi
Дата:
Сообщение: Re: Is it useful to record whether plans are generic or custom?