Re: WIP: Enhanced ALTER OPERATOR

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Uriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Enhanced ALTER OPERATOR
Date: 2015-07-10 12:46:35
Message-ID: 559FBEAB.1060005@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/06/2015 07:21 PM, Uriy Zhuravlev wrote:
> Hello hackers.
>
> This is the fifth version of the patch (the fourth was unsuccessful :)).
> I added documentation and was held a small refactoring.

I edited the formatting of the syntax page a bit, and came up with this:

ALTER OPERATOR name ( { left_type | NONE } , { right_type | NONE } )
SET ( { RESTRICT = { res_proc | NULL }
| JOIN = { join_proc | NULL }
} [, ... ] )

A couple of minor issues with the syntax itself:

* I think it'd be better to use NONE instead of NULL above, to remove
the estimator. It seems inconsistent when we've used NONE to mean
"missing" earlier in the same statement.

* The way you check for the NULL in OperatorUpd is wrong. It cannot
distinguish between a quoted "null", meaning a function called "null",
and a NULL, meaning no function. (You can argue that you're just asking
for trouble if you name any function "null", but we're careful to deal
with that correctly everywhere else.) You don't have the information
about quoting once you leave the parser, so you'll have to distinguish
those in the grammar.

Attached is a new version of your patch, rebased over current master,
and the docs formatting fixes.

- Heikki

Attachment Content-Type Size
extend_alter_operator_v5-heikki.patch text/x-diff 24.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-07-10 12:55:46 Re: ctidscan as an example of custom-scan (Re: [v9.5] Custom Plan API)
Previous Message Pavel Stehule 2015-07-10 12:38:39 Re: [PATCH] Generalized JSON output functions