Re: Improve the HINT message of the ALTER command for postgres_fdw

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Improve the HINT message of the ALTER command for postgres_fdw
Дата
Msg-id CALj2ACU7XhadSLpT1x3988RY5ryZRGqo+vwRVF+zmaedzmhi2A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve the HINT message of the ALTER command for postgres_fdw  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: Improve the HINT message of the ALTER command for postgres_fdw
Список pgsql-hackers
On Tue, Oct 12, 2021 at 11:11 PM Fujii Masao
<masao.fujii@oss.nttdata.com> wrote:
> BTW, I found file_fdw.c, dblink.c, postgres_fdw/option.c and foreign.c
> use different error codes for the same error message as follows.
> They should use the same error code? If yes, ISTM that
> ERRCODE_FDW_INVALID_OPTION_NAME is better because
> the error message is "invalid option ...".
>
> - ERRCODE_FDW_INVALID_OPTION_NAME (file_fdw.c)
> - ERRCODE_FDW_OPTION_NAME_NOT_FOUND (dblink.c)
> - ERRCODE_FDW_INVALID_OPTION_NAME (postgres_fdw/option.c)
> - ERRCODE_SYNTAX_ERROR (foreign.c)

Good catch. ERRCODE_FDW_INVALID_OPTION_NAME seems reasonable to me. I
think we can remove the error code ERRCODE_FDW_OPTION_NAME_NOT_FOUND
(it is being used only by dblink.c), instead use
ERRCODE_FDW_INVALID_OPTION_NAME for all option parsing and
validations.

Regards,
Bharath Rupireddy.



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

Предыдущее
От: Stan Hu
Дата:
Сообщение: lastOverflowedXid does not handle transaction ID wraparound
Следующее
От: Andrew Bille
Дата:
Сообщение: Re: [Proposal] Global temporary tables