Re: Inaccurate error message when set fdw batch_size to 0

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inaccurate error message when set fdw batch_size to 0
Дата
Msg-id 621822.1620655780@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inaccurate error message when set fdw batch_size to 0  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Inaccurate error message when set fdw batch_size to 0  (Michael Paquier <michael@paquier.xyz>)
Re: Inaccurate error message when set fdw batch_size to 0  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:
> On Mon, May 10, 2021 at 12:00 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yeah, this error message seems outright buggy.  However, it's a minor
>> matter.  Also, some people think "positive" is the same thing as
>> "non-negative", so maybe we need less ambiguous wording?

> Since value 0 can't be considered as either a positive or negative
> integer, I think we can do as following(roughly):

> if (value < 0) "requires a zero or positive integer value"
> if (value <= 0) "requires a positive integer value"

I was thinking of avoiding the passive voice and writing

    "foo must be greater than zero"

which removes all doubt.  It's not necessary to keep the "integer"
aspect of the existing text, because if someone had supplied a
non-integer value, that would not have gotten this far anyway.

> I'm not sure whether we should consider changing these messages:
> remainder for hash partition must be a non-negative integer
> parallel vacuum degree must be a non-negative integer
> repeat count size must be a non-negative integer
> number of workers must be a non-negative integer
> %s requires a non-negative numeric value
> distance in phrase operator should be non-negative and less than %d

I think for consistency it'd be good to change 'em all.  I'm almost
tempted to put this matter into our message style guide too.

            regards, tom lane



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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: PG 14 release notes, first draft
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GetSubscriptionRelations declares too many scan keys