From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: merge pg_proc and pg_operator? |
Date: | 2011-07-02 21:20:07 |
Message-ID: | 19658.1309641607@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)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 precisely
a + 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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-07-02 23:58:16 | Re: merge pg_proc and pg_operator? |
Previous Message | Peter Eisentraut | 2011-07-02 21:02:05 | merge pg_proc and pg_operator? |