Re: merge pg_proc and pg_operator?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: merge pg_proc and pg_operator?
Дата
Msg-id 19658.1309641607@sss.pgh.pa.us
обсуждение исходный текст
Ответ на merge pg_proc and pg_operator?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: merge pg_proc and pg_operator?
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> This thought reemerged in me during the recent discussion of the regular
> expression matching operators: A lot of things could be better if
> pg_proc and pg_operator were merged together.

Like what?  I think this would result in a huge amount of code churn
(including lots of third-party and application-side breakage) for very
marginal benefits.

> Most importantly, operator optimization information could be attached to
> procedures,

We should definitely do that someday, but there are far less invasive
ways to do it than fundamentally restructuring core catalogs.  Moreover,
the work required to make it happen is largely unrelated to the changes
you propose.

> But you could just as well call
>     "+"(a, b)
> or
>     a OPERATOR("add") b

I think only geeks would find that equivalence of interest.  It's a
rather unintuitive dualism anyway, since you would have to explain
why the alternatives are preciselya + b"+"(a, b)
and why the quotes are required in the second case and forbidden in the
first case, and why the rules are quite different from that if it's a
function-ish name and not an operator-ish name.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: merge pg_proc and pg_operator?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: merge pg_proc and pg_operator?