1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Extend psql's \lo_list/\dl to be able to print large objects' ACLs.

The ACL is printed when you add + to the command, similarly to
various other psql backslash commands.

Along the way, move the code for this into describe.c,
where it is a better fit (and can share some code).

Pavel Luzanov, reviewed by Georgios Kokolatos

Discussion: https://postgr.es/m/6d722115-6297-bc53-bb7f-5f150e765299@postgrespro.ru
This commit is contained in:
Tom Lane
2022-01-06 13:09:05 -05:00
parent ee5822361d
commit 328dfbdabd
11 changed files with 144 additions and 100 deletions

View File

@ -2146,7 +2146,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
<entry><literal>LARGE OBJECT</literal></entry>
<entry><literal>rw</literal></entry>
<entry>none</entry>
<entry></entry>
<entry><literal>\dl+</literal></entry>
</row>
<row>
<entry><literal>SCHEMA</literal></entry>

View File

@ -1681,11 +1681,14 @@ testdb=&gt;
<varlistentry>
<term><literal>\dl</literal></term>
<term><literal>\dl[+]</literal></term>
<listitem>
<para>
This is an alias for <command>\lo_list</command>, which shows a
list of large objects.
If <literal>+</literal> is appended to the command name,
each large object is listed with its associated permissions,
if any.
</para>
</listitem>
</varlistentry>
@ -2610,12 +2613,15 @@ lo_import 152801
</varlistentry>
<varlistentry>
<term><literal>\lo_list</literal></term>
<term><literal>\lo_list[+]</literal></term>
<listitem>
<para>
Shows a list of all <productname>PostgreSQL</productname>
large objects currently stored in the database,
along with any comments provided for them.
If <literal>+</literal> is appended to the command name,
each large object is listed with its associated permissions,
if any.
</para>
</listitem>
</varlistentry>