Re: Extend ALTER DEFAULT PRIVILEGES for large objects

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yugo NAGATA <nagata@sraoss.co.jp>
Cc: pgsql-hackers@postgresql.org
Date: 2024-04-24T03:47:38Z
Lists: pgsql-hackers
Yugo NAGATA <nagata@sraoss.co.jp> writes:
> Currently, ALTER DEFAULT PRIVILEGE doesn't support large objects,
> so if we want to allow users other than the owner to use the large
> object, we need to grant a privilege on it every time a large object
> is created. One of our clients feels that this is annoying, so I would
> like propose to extend  ALTER DEFAULT PRIVILEGE to large objects. 

I wonder how this plays with pg_dump, and in particular whether it
breaks the optimizations that a45c78e32 installed for large numbers
of large objects.  The added test cases seem to go out of their way
to leave no trace behind that the pg_dump/pg_upgrade tests might
encounter.

I think you broke psql's \ddp, too.  And some other places; grepping
for DEFACLOBJ_NAMESPACE finds other oversights.

On the whole I find this proposed feature pretty unexciting
and dubiously worthy of the implementation/maintenance effort.

			regards, tom lane



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. psql: Fix tab-completion after GRANT/REVOKE on LARGE OBJECT and FOREIGN SERVER.

  2. psql: Improve psql tab completion for GRANT/REVOKE on large objects.

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

  4. Convert tab-complete's long else-if chain to a switch statement.