public inbox for [email protected]  
help / color / mirror / Atom feed
From: Justin Pryzby <[email protected]>
To: Pavel Luzanov <[email protected]>
Cc: [email protected]
Subject: Re: psql: \dl+ to list large objects privileges
Date: Tue, 4 Jan 2022 00:24:18 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Tue, Aug 31, 2021 at 05:14:12PM +0300, Pavel Luzanov wrote:
> I decided to move the do_lo_list function to describe.c in order to use the
> printACLColumn helper function. And at the same time I renamed do_lo_list to
> listLargeObjects to unify with the names of other similar functions.

The tabs were changed to spaces when you moved the function.

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.
Possibly like git diff HEAD~:src/bin/psql/large_obj.c src/bin/psql/describe.c

> +        if (pset.sversion >= 90000)

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

> I don't like how I handled the + modifier in the \lo_list command. But I
> don't know how to do better now. This is the second time I've programmed in
> C. The first time was the 'Hello World' program. So maybe something is done
> wrong.

I think everywhere else just uses verbose = strchr(cmd, '+') != 0;

-- 
Justin






view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: psql: \dl+ to list large objects privileges
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox