psql: \dl+ to list large objects privileges

From: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: psql: \dl+ to list large objects privileges
Date: 2021-08-31 14:14:12
Message-ID: 6d722115-6297-bc53-bb7f-5f150e765299@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

While working through the documentation I found an empty cell in the
table for the large objects privilege display with the psql command [1].
And indeed the \dl command does not show privileges. And there is no
modifier + for it.

This patch adds a + modifier to the \dl command and also to the \lo_list
command to display privilege information on large objects.

I decided to move the do_lo_list function to describe.c in order to use
the printACLColumn helper function. And at the same time I renamed
do_lo_list to listLargeObjects to unify with the names of other similar
functions.

I don't like how I handled the + modifier in the \lo_list command. But I
don't know how to do better now. This is the second time I've programmed
in C. The first time was the 'Hello World' program. So maybe something
is done wrong.

If it's interesting, I can add the patch to commitfest.

1.
https://www.postgresql.org/docs/devel/ddl-priv.html#PRIVILEGES-SUMMARY-TABLE

--
Pavel Luzanov
Postgres Professional: https://postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
lo-list-acl.patch text/x-patch 8.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-08-31 14:23:27 Re: Possible missing segments in archiving on standby
Previous Message vignesh C 2021-08-31 14:05:44 Re: Added schema level support for publication.