summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-01-06 13:09:05 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-01-06 13:09:05 -0500
commit328dfbdabd22e321bfe1f0547be71faca99a11e9 (patch)
tree3066c13d8e42d48fcbe95b53bca85bf66e9d03a1 /src/bin/psql/command.c
parentee5822361dabf03300a24f60d57a968a654e1d46 (diff)
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
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index fb3bab94948..414fc32152a 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -811,7 +811,7 @@ exec_command_d(PsqlScanState scan_state, bool active_branch, const char *cmd)
success = describeRoles(pattern, show_verbose, show_system);
break;
case 'l':
- success = do_lo_list();
+ success = listLargeObjects(show_verbose);
break;
case 'L':
success = listLanguages(pattern, show_verbose, show_system);
@@ -1963,7 +1963,9 @@ exec_command_lo(PsqlScanState scan_state, bool active_branch, const char *cmd)
}
else if (strcmp(cmd + 3, "list") == 0)
- success = do_lo_list();
+ success = listLargeObjects(false);
+ else if (strcmp(cmd + 3, "list+") == 0)
+ success = listLargeObjects(true);
else if (strcmp(cmd + 3, "unlink") == 0)
{