Re: merge pg_proc and pg_operator? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: merge pg_proc and pg_operator?
Date
Msg-id 19658.1309641607@sss.pgh.pa.us
Whole thread Raw
In response to merge pg_proc and pg_operator?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: merge pg_proc and pg_operator?
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: merge pg_proc and pg_operator?
Next
From: Robert Haas
Date:
Subject: Re: merge pg_proc and pg_operator?