Re: WIP: Enhanced ALTER OPERATOR

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Heikki <hlinnaka(at)iki(dot)fi>
Cc: Uriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Enhanced ALTER OPERATOR
Date: 2015-07-14 16:28:12
Message-ID: CAMkU=1zOJT9N8eaQMKjS6z=295DZst4fAhEhvf9fYUXt-gkEVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 14, 2015 at 8:22 AM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:

> On 07/13/2015 03:43 PM, Uriy Zhuravlev wrote:
>
>> Hello hackers.
>>
>> Attached is a new version of patch:
>> * port syntax from NULL to truth NONE
>> * fix documentation (thanks Heikki)
>> * rebase to master
>>
>
> Thanks, committed after some editing. I put all the logic into
> AlterOperator function, in operatorcmds.c, rather than pg_operator.c. I
> think that's how we've lately organized commands. I also simplified the
> code quite a bit - I think you had copy-pasted from one of the generic
> ALTER variants, like AlterOwnerStmt, which was overly generic for ALTER
> OPERATOR. No need to look up the owner/name attributes dynamically, etc.
>
> There was one genuine bug that I fixed: the ALTER OPERATOR command didn't
> check all the same conditions that CREATE OPERATOR did, namely that only
> binary operators can have join selectivity, and that only boolean operators
> can have restriction/join selectivity.

I'm getting some compiler warnings now:

operatorcmds.c: In function 'AlterOperator':
operatorcmds.c:504: warning: 'address.objectSubId' may be used
uninitialized in this function
operatorcmds.c:365: note: 'address.objectSubId' was declared here
operatorcmds.c:504: warning: 'address.objectId' may be used uninitialized
in this function
operatorcmds.c:365: note: 'address.objectId' was declared here
operatorcmds.c:504: warning: 'address.classId' may be used uninitialized in
this function
operatorcmds.c:365: note: 'address.classId' was declared here

gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)

Thanks,

Jeff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2015-07-14 16:33:13 Re: Support retrieving value from any sequence
Previous Message Robert Haas 2015-07-14 16:27:07 Re: Minor issue with BRIN regression tests