Re: Add has_large_object_privilege function

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add has_large_object_privilege function
Date: 2024-09-27 03:26:22
Message-ID: 20240927122622.0af59cc47144e613d4004963@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 26 Sep 2024 17:16:07 +0900
Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> On Fri, Sep 13, 2024 at 03:56:11PM +0900, Yugo Nagata wrote:
> > I confirmed the patches are committed in the master branch.
> > Thank you!
> >
> > I've updated the commitfest status to "committed".
>
> This patch has been committed as of 4eada203a5a8, and introduced this
> block in pg_proc.dat:
>
> { oid => '4551', descr => 'user privilege on large objct by username, large object oid',
> proname => 'has_largeobject_privilege', procost => '10', provolatile => 's',
> prorettype => 'bool', proargtypes => 'name oid text',
> prosrc => 'has_largeobject_privilege_name_id' },
> { oid => '4552', descr => 'current privilege on large objct by large object oid',
> proname => 'has_largeobject_privilege', procost => '10', provolatile => 's',
> prorettype => 'bool', proargtypes => 'oid text',
> prosrc => 'has_largeobject_privilege_id' },
> { oid => '4553', descr => 'user privilege on large objct by user oid, large object oid',
> proname => 'has_largeobject_privilege', procost => '10', provolatile => 's',
> prorettype => 'bool', proargtypes => 'oid oid text',
> prosrc => 'has_largeobject_privilege_id_id' },
>
> This has a couple of mistakes:
> - New functions introduced during a development cycle should use OIDs in
> the range 8000-9999. See 98eab30b93d5, consisting of running
> ./unused_oids to get a random range.
> - The function descriptions are inconsistent and have the three same
> typos:
> -- s/large objct/large object/.
> -- s/current privilege/current user privilege/ for the second entry.

Thank you for pointing out them.
I used unused_oids to look for available oids, but I missed to
follow the best practice suggested by it. I'll be careful.

Regards,
Yugo Nagata

>
> And while that's not mandatory for committers, I would apply a
> reformat-dat-files while on it, to reduce some diffs I'm seeing.
>
> This results in the attached that I'd like to apply to fix all that. It
> needs a catalog version bump, of course.
> --
> Michael

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2024-09-27 03:42:34 Re: MAINTAIN privilege -- what do we need to un-revert it?
Previous Message Nathan Bossart 2024-09-27 03:23:43 Re: micro-optimize nbtcompare.c routines