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

Поиск
Список
Период
Сортировка
Искать
От
Michael Paquier
Тема
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators
Дата
Msg-id
20200428060328.GF279958@paquier.xyz
Ответ на
Список
Дерево обсуждения
+(pg_lsn, int8) and -(pg_lsn, int8) operators Fujii Masao <masao.fujii@oss.nttdata.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Robert Haas <robertmhaas@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Michael Paquier <michael@paquier.xyz>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Robert Haas <robertmhaas@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Fujii Masao <masao.fujii@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>
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>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Fujii Masao <masao.fujii@oss.nttdata.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Fujii Masao <masao.fujii@oss.nttdata.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Fujii Masao <masao.fujii@oss.nttdata.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Fujii Masao <masao.fujii@oss.nttdata.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Robert Haas <robertmhaas@gmail.com>
On Tue, Apr 28, 2020 at 12:56:19PM +0900, Fujii Masao wrote:
> Yes. Attached is the updated version of the patch, which introduces
> +(pg_lsn, numeric) and -(pg_lsn, numeric) operators.
> To implement them, I added also numeric_pg_lsn() function that converts
> numeric to pg_lsn.

-    those write-ahead log locations.
+    those write-ahead log locations. Also the number of bytes can be added
+    into and substracted from LSN using the + and
+    - operators, respectively.
That's short.  Should this mention the restriction with numeric (or
just recommend its use) because we don't have a 64b unsigned type
internally, basically Robert's point? 

+   /* 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.
--
Michael
В списке pgsql-hackers по дате отправления
От: Fujii Masao
Дата:
От: Michael Paquier
Дата:
FAQ