public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fujii Masao <[email protected]>
To: Yugo NAGATA <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Extend ALTER DEFAULT PRIVILEGES for large objects
Date: Fri, 4 Apr 2025 00:21:27 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<20240424210839.GA863220@nathanxps13>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>



On 2025/04/03 23:04, Yugo NAGATA wrote:
> On Wed, 2 Apr 2025 02:35:35 +0900
> Fujii Masao <[email protected]> wrote:
> 
>>
>>
>> On 2025/01/23 19:22, Yugo NAGATA wrote:
>>> On Wed, 22 Jan 2025 13:30:17 +0100
>>> Laurenz Albe <[email protected]> wrote:
>>>
>>>> On Fri, 2024-09-13 at 16:18 +0900, Yugo Nagata wrote:
>>>>> I've attached a updated patch. The test is rewritten using has_largeobject_privilege()
>>>>> function instead of calling loread & lowrite, which makes the test a bit simpler.
>>>>> Thare are no other changes.
>>>>
>>>> When I tried to apply this patch, I found that it doesn't apply any
>>>> more since commit f391d9dc93 renamed tab-complete.c to tab-complete.in.c.
>>>>
>>>> Attached is a rebased patch.
>>>
>>> Thank you for updating the patch!
>>>
>>>> I agree that large objects are a feature that should fade out (alas,
>>>> the JDBC driver still uses it for BLOBs).  But this patch is not big
>>>> or complicated and is unlikely to create a big maintenance burden.
>>>>
>>>> So I am somewhat for committing it.  It works as advertised.
>>>> If you are fine with my rebased patch, I can mark it as "ready for
>>>> committer".  If it actually gets committed depends on whether there
>>>> is a committer who thinks it worth the effort or not.
>>>
>>> I confirmed the patch and I am fine with it.
>>
>> I've started reviewing this patch since it's marked as "ready for committer".
> 
> Thank you for your reviewing this patch!
> 
>> I know of several systems that use large objects, and I believe
>> this feature would be beneficial for them. Overall, I like the idea.
>>
>>
>> The latest patch looks good to me. I just have one minor comment:
>>
>>>    only the privileges for schemas, tables (including views and foreign
>>>    tables), sequences, functions, and types (including domains) can be
>>>    altered.
>>
>> In alter_default_privileges.sgml, this part should also mention large objects?
> 
> Agreed. I attached a updated patch.

Thanks for updating the patch!

If there are no objections, I'll proceed with committing it using the following commit log.

----------------
Extend ALTER DEFAULT PRIVILEGES to define default privileges for large objects.

Previously, ALTER DEFAULT PRIVILEGES did not support large objects.
This meant that to grant privileges to users other than the owner,
permissions had to be manually assigned each time a large object
was created, which was inconvenient.

This commit extends ALTER DEFAULT PRIVILEGES to allow defining default
access privileges for large objects. With this change, specified privileges
will automatically apply to newly created large objects, making privilege
management more efficient.

As a side effect, this commit introduces the new keyword OBJECTS
since it's used in the syntax of ALTER DEFAULT PRIVILEGES.

Original patch by Haruka Takatsuka, with some fixes and tests by Yugo Nagata,
and rebased by Laurenz Albe.

Author: Takatsuka Haruka <[email protected]>
Co-authored-by: Yugo Nagata <[email protected]>
Co-authored-by: Laurenz Albe <[email protected]>
Reviewed-by: Masao Fujii <[email protected]>
Discussion: https://postgr.es/m/[email protected]
----------------

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION






view thread (33+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Extend ALTER DEFAULT PRIVILEGES for large objects
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox