Re: Fix error message for MERGE foreign tables

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Fix error message for MERGE foreign tables
Дата
Msg-id CAMbWs49RGbt7DWjGdrRZjq9eQiNGGfpzbAZFBYiM=MYFLqa1GQ@mail.gmail.com
обсуждение исходный текст
Ответ на Fix error message for MERGE foreign tables  (bt22nakamorit <bt22nakamorit@oss.nttdata.com>)
Ответы Re: Fix error message for MERGE foreign tables  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-hackers

On Fri, Oct 14, 2022 at 10:59 AM bt22nakamorit <bt22nakamorit@oss.nttdata.com> wrote:
Hi,

MERGE command does not accept foreign tables as targets.
When a foreign table is specified as a target, it shows error messages
like this:

-- ERROR:  cannot execute MERGE on relation "child1"
-- DETAIL:  This operation is not supported for foreign tables.

However, when a partitioned table includes foreign tables as partitions
and MERGE is executed on the partitioned table, following error message
shows.

-- ERROR:  unexpected operation: 5

The latter error message is unclear, and should be the same as the
former one.
The attached patch adds the code to display error the former error
messages in the latter case.
Any thoughts?
 
+1. The new message is an improvement to the default one.

I wonder if we can provide more details in the error message, such as
foreign table name.

Thanks
Richard

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: GUC values - recommended way to declare the C variables?
Следующее
От: Richard Guo
Дата:
Сообщение: Re: Fix error message for MERGE foreign tables