Re: psql: \dl+ to list large objects privileges

From: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: psql: \dl+ to list large objects privileges
Date: 2022-01-06 11:41:19
Message-ID: 50d41934-edca-c607-47d1-485b191fac1d@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Justin, Tom,

Thanks for the review and the help in splitting the patch into two parts.

> I wonder if we shouldn't put these new tests in largeobject.sql instead.
> (That would mean there are two expected-files to change, which is a bit
> tedious, but it's not very hard.)

As suggested, I moved the tests from psql.sql to largeobject.sql.
The tests are added to the beginning of the file because I need one
large object with a known id and a known owner.  This guarantees the
same output of \dl+ as expected.

I made the same changes to two files in the 'expected' directory:
largeobject.out and largeobject_1.out.
Although I must say that I still can't understand why more than one file
with expected result is used for some tests.

Also, I decided to delete following line in the listLargeObjects
function because all the other commands in describe.c do not contain it:
    myopt.topt.tuples_only = false;

This changed the existing behavior, but is consistent with the other
commands.

Second version (after splitting) is attached.
v2-0001-move-and-rename-do_lo_list.patch - no changes,
v2-0002-print-large-object-acls.patch - tests moved to largeobject.sql

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

Attachment Content-Type Size
v2-0001-move-and-rename-do_lo_list.patch text/x-patch 3.7 KB
v2-0002-print-large-object-acls.patch text/x-patch 15.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-01-06 12:10:07 Re: row filtering for logical replication
Previous Message Himanshu Upadhyaya 2022-01-06 11:24:32 Re: SQL/JSON: functions