Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators
Дата
Msg-id a03389b8-84f2-d9e4-3258-4f3b9f202963@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers

On 2020/05/02 11:29, Michael Paquier wrote:
> On Thu, Apr 30, 2020 at 11:40:59PM +0900, Fujii Masao wrote:
>> Also the number of bytes can be added into and substracted from LSN using the
>> <literal>+(pg_lsn,numeric)</literal> and <literal>-(pg_lsn,numeric)</literal>
>> operators, respectively. Note that the calculated LSN should be in the range
>> of <type>pg_lsn</type> type, i.e., between <literal>0/0</literal> and
>> <literal>FFFFFFFF/FFFFFFFF</literal>.
>> -----------------
> 
> That reads fine.

Ok, I will update the docs in that way.

> 
>>> +   /* XXX would it be better to return NULL? */
>>> +   if (NUMERIC_IS_NAN(num))
>>> +       ereport(ERROR,
>>> +               (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
>>> +                errmsg("cannot convert NaN to pg_lsn")));
>>> That would be good to test, and an error sounds fine to me.
>>
>> You mean that we should add the test that goes through this code block,
>> into the regression test?
> 
> Yes, that looks worth making sure to track, especially if the behavior
> of this code changes in the future.

Ok, I will add that regression test.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Should smgrdounlink() be removed?
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators