Inaccurate error message when set fdw batch_size to 0

Поиск
Список
Период
Сортировка
От houzj.fnst@fujitsu.com
Тема Inaccurate error message when set fdw batch_size to 0
Дата
Msg-id OS0PR01MB5716415335A06B489F1B3A8194569@OS0PR01MB5716.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответы Re: Inaccurate error message when set fdw batch_size to 0  (Dilip Kumar <dilipbalaut@gmail.com>)
RE: Inaccurate error message when set fdw batch_size to 0  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Список pgsql-hackers

Hi,

 

When testing the fdw batch insert, I found a possible issue.

 

If I set the batch_size to 0 , it will throw an error:

 

---------------------

CREATE FOREIGN TABLE test(a int, b varchar)

  SERVER testserver

  OPTIONS (table_name 'testlocal', batch_size '0');

ERROR:  fetch_size requires a non-negative integer value

---------------------

 

The error message here seems not accurate, because

I can see from the code batch_size should be positive ( > 0).

 

So, is it better to change the error message to “fetch_size requires a positive integer value” ?

I also found fetch_size has the similar issue, attaching a patch to fix this.

 

Best regards,

houzj

 

Вложения

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Anti-critical-section assertion failure in mcxt.c reached by walsender
Следующее
От: David Rowley
Дата:
Сообщение: Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays