1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +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

@ -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)
{