Re: proposal: multiple psql option -c

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: proposal: multiple psql option -c
Дата
Msg-id CAB7nPqSLi8vyEVfC+kQ1WkA896YaOPDFHksmY5ne6uF9jjJWDw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Wed, Dec 2, 2015 at 2:56 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 2015-12-01 17:52 GMT+01:00 Catalin Iacob <iacobcatalin@gmail.com>:
>> One maybe slightly surprising behaviour is that -f - can be specified
>> multiple times and only the first one has an effect since the others
>> act on an exhausted stdin. But I don't think forbidding multiple -f -
>> is better.

I don't see any good reason to forbid it actually. This simplifies the
code and it's not like this would break psql.

>> As for the code (these still apply to Michael's latest patch):
>>
>> 1. the be compiler quiete comment is not good English, /* silence the
>> compiler */ would be better or remove it completely

Fixed. Indeed I didn't notice that.

>> 2. shouldn't atyp in SimpleActionListCell be of type enum _atypes?
>> Otherwise why an enum if it's casted to int when actually used? If
>> it's an enum the repeated ifs on cell->atyp should be a switch, either
>> with a default Assert(0) or no default which makes gcc give a warning
>> if an enum value is ever added without having a corresponding case.
> It is maybe different topic - the psql uses enums and ints very freely. So I
> wrote code consistent with current code.

Yeah, I don't think that's a big issue either to be honest. The code
is kept consistent a maximum with what is there previously.

Patch is switched to ready for committer.
--
Michael

Вложения

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: pgsql: Further tweaking of print_aligned_vertical().
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Use pg_rewind when target timeline was switched