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

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: psql: \dl+ to list large objects privileges
Дата
Msg-id 20220104062417.GA14051@telsasoft.com
обсуждение исходный текст
Ответ на psql: \dl+ to list large objects privileges  (Pavel Luzanov <p.luzanov@postgrespro.ru>)
Ответы Re: psql: \dl+ to list large objects privileges  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: Inconsistent ellipsis in regression test error message?
Следующее
От: Peter Smith
Дата:
Сообщение: Re: row filtering for logical replication