Re: Enhanced error message to include hint messages for redundant options error

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Enhanced error message to include hint messages for redundant options error
Дата
Msg-id 20210426155432.GA13341@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Enhanced error message to include hint messages for redundant options error  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Enhanced error message to include hint messages for redundant options error
Re: Enhanced error message to include hint messages for redundant options error
Список pgsql-hackers
On 2021-Apr-26, Bharath Rupireddy wrote:

> I agree that we can just be clear about the problem. Looks like the
> majority of the errors "conflicting or redundant options" are for
> redundant options. So, wherever "conflicting or redundant options"
> exists: 1) change the message to "option \"%s\" specified more than
> once" and remove parser_errposition if it's there because the option
> name in the error message would give the info with which user can
> point to the location

Hmm, I would keep the parser_errposition() even if the option name is
mentioned in the error message.  There's no harm in being a little
redundant, with both the option name and the error cursor showing the
same thing.

> 2) change the message to something like "option \"%s\" is conflicting
> with option \"%s\"".

Maybe, but since these would all be special cases, I think we'd need to
discuss them individually.  I would suggest that in order not to stall
this patch, these cases should all stay as "redundant or conflicting
options" -- that is, avoid any further change apart from exactly the
thing you came here to change.  You can submit a 0002 patch to change
those other errors.  That way, even if those changes end up rejected for
whatever reason, you still got your 0001 done (which would change the
bulk of "conflicting or redundant" error to the "option %s already
specified" error).  Some progress is better than none.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
<Schwern> It does it in a really, really complicated way
<crab> why does it need to be complicated?
<Schwern> Because it's MakeMaker.



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Enhanced error message to include hint messages for redundant options error
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: compute_query_id and pg_stat_statements