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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: psql: \dl+ to list large objects privileges
Date: 2022-01-04 20:42:07
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:
> I suggest to move the function in a separate 0001 commit, which makes no code
> changes other than moving from one file to another.
> A committer would probably push them as a single patch, but this makes it
> easier to read and review the changes in 0002.

Yeah, I agree with that idea. It's really tough to notice small changes
by hand when the entire code block has been moved somewhere else.

> Since a few weeks ago, psql no longer supports server versions before 9.2, so
> the "if" branch can go away.

And, in fact, the patch is no longer applying per the cfbot, because
that hasn't been done.

To move things along a bit, I split the patch more or less as Justin
suggests and brought it up to HEAD. I did not study the command.c
changes, but the rest of it seems okay, with one exception: I don't like
the test case much at all. For one thing, it will fail in the buildfarm
because you didn't adhere to the convention that roles created by a
regression test must be named regress_something. For another, there's
considerable overlap with testing done in largeobject.sql, which
already creates some commented large objects. That means there's
an undesirable ordering dependency --- if somebody wanted to run
largeobject.sql first, the expected output of psql.sql would change.
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.)

regards, tom lane

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

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Brindle 2022-01-04 20:47:31 Re: CREATEROLE and role ownership hierarchies
Previous Message Mark Dilger 2022-01-04 20:39:32 Re: CREATEROLE and role ownership hierarchies