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

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators
Date: 2020-04-28 03:56:19
Message-ID: c849ce81-e7bf-1d62-9b0f-959d2a1b467d@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/04/28 1:24, Robert Haas wrote:
> On Sun, Apr 26, 2020 at 9:41 PM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
>> +1. I actually sometimes need it.
>>
>> y the way, -(pg_lsn, pg_lsn) yields a numeric.
>
> It might be a good idea to use numeric here, too. Because int8 is
> signed, it's not big enough to cover the whole range of LSNs.

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.

Regards,

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

Attachment Content-Type Size
pg_lsn_operators_v2.patch text/plain 10.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-04-28 04:31:23 Re: pg_rewind docs correction
Previous Message Jonah H. Harris 2020-04-28 03:49:30 Re: Proposing WITH ITERATIVE