Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUhu9-0006pV-Jv for pgsql-hackers@arkaria.postgresql.org; Sat, 02 May 2020 02:29:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jUhu8-0002Y5-DZ for pgsql-hackers@arkaria.postgresql.org; Sat, 02 May 2020 02:29:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUhu8-0002VV-6l for pgsql-hackers@lists.postgresql.org; Sat, 02 May 2020 02:29:24 +0000 Received: from [64.147.123.24] (helo=wout1-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUhu4-0003K7-6J for pgsql-hackers@postgresql.org; Sat, 02 May 2020 02:29:22 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id CFA73514; Fri, 1 May 2020 22:29:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 01 May 2020 22:29:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=jzAaxgePJIO+2EtOybz8j90O6Uz Nv3XufULGlAt1eIk=; b=TJHoX3W5RoifPgJPv8mARnUluAnGDZNXbNNbMxX3Nzk k7p/xT4ZTuJ4FxKiU+KQeN7ssDHsYc4XVPJuYQXqoLuIuyD7fiDtCdmpRlBxOmjW RsiBgQV/o0Gex5MIbw305iT6zVlJGZUxlbuso8unksskrJ5DyCk96fF94MWQOztT Hm8L+Wdp5Y+XlUBkTre9xrsFf0ZHRXJXRuWM19nTX1K/Dh6x7SIz39esycsknoU7 3w4YR9Fx9PLtQTyK+zMw56VguLlnQo+noAhZ5MAIVNKrsjA6+H5mGlJtZ5QE5VEd cillY22CM+bYLlGHyXRZoOrv/Om3eUaQYz2PJxALSLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jzAaxg ePJIO+2EtOybz8j90O6UzNv3XufULGlAt1eIk=; b=XGFZbVCE9ujemoZFRqgGVW 2Q4MWwvsGl/nrYMa4z9L7RJq+U9AMt0nmOSZ4zx6AS8wvXVA9bXyq9rK0HVLLH5p od7zfOJRKIuahrKlMx+VaM/qBwLonSChJ7ivJijipSEI+suNSiBRdh5JWsUCUpcZ j6gJXg7mLse0AboPV+SjLen0pOF92grdZe0pVXsB2q/jP++rGDYf6H7xCrk25NUP KvAg4EjI/i3ovyhep993T0jLLlp4RFBrFBe1SPP37bjcqCt1ZS9UiD7uHN5WWHiS DrFAEGwwuMsIGRvZtOmehGGzlqWIkRq0u3lV9/XCTJAnuxyM6jARA7mKHyGwEjnw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieekgdehjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecukfhppeduuddurddutddvrddukedtrd dukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 74279328005A; Fri, 1 May 2020 22:29:05 -0400 (EDT) Date: Sat, 2 May 2020 11:29:00 +0900 From: Michael Paquier To: Fujii Masao Cc: Robert Haas , Kyotaro Horiguchi , Jehan-Guillaume de Rorthais , "pgsql-hackers@postgresql.org" Subject: Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators Message-ID: <20200502022900.GD409463@paquier.xyz> References: <20200424072414.GP33034@paquier.xyz> <20200424121526.399578eb@firost> <20200427.104147.1848676018835134301.horikyota.ntt@gmail.com> <20200428060328.GF279958@paquier.xyz> <8aa9c491-c693-0e8c-66e8-eb22e72ab329@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d9ADC0YsG2v16Js0" Content-Disposition: inline In-Reply-To: <8aa9c491-c693-0e8c-66e8-eb22e72ab329@oss.nttdata.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.24 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --d9ADC0YsG2v16Js0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > +(pg_lsn,numeric) and -(pg_lsn,numeric) > operators, respectively. Note that the calculated LSN should be in the ra= nge > of pg_lsn type, i.e., between 0/0 and > FFFFFFFF/FFFFFFFF. > ----------------- That reads fine. >> + /* 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. >=20 > 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. -- Michael --d9ADC0YsG2v16Js0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl6s2uwACgkQnvQgOdby QH0UMQ//YCIxHHHoE5h+6p7aIfYzmYGmwu3cM1CIXkeXop2s9xwkj4f29gZLA1az Hx7TcPG8jqU7gH8biYQx/ENAf1BpPcpVh73RRqe2+pgG293xb36W326zAeARnuBI PpFtmZDH4QezVJaBjccjxC+Q4uVsUtK1ip39xjnb8Sxc/LJSm46bb9a8k25u8meB U3CUZjQWdyYCgfMLAsCjazXYNl9mexx7MuBdAiXDBvh0OoDMN7VFn3xVdgsno23f CgT1mlq7q49NIYx6R8k8AgN+b78/WBcKWy+o9Pbt3+Pq8q9z5v2FB066A1Dqty7l NWXHGJ5s+T2tPeRH8d7T6Xp6ImzhzE2CgdS9FE+IlYRbkUKaN4mjkY4vEdd4AufZ XyHskPfQu1Ou38R+nDMMcT05EdhmNLMmC/6JoGf8AeGTVz8ssUgZ/ADx7s6v54hd D3bMRs7e/L7Pep2PcJ4N9kH8w+eIQdlIlvpHJ3AV90ebZbtmT7JLdfFuFSPuWAG8 NrJ0jFc0kAEPcZukLoF4sSkuahK2pW+i20uLm1jgkAXYBVyB6upbFT9Gm819lv6Z IFKd230btAykOnWJwgchj0bUMDmkShdTZQ0H4m6eoIsmkNbxYBe3dzEzwvaMJHHO oGKbuMU2dSM7+5kIQdgsGjU78eV5r+6ckqeYqAayPIltI6m2T74= =XiXU -----END PGP SIGNATURE----- --d9ADC0YsG2v16Js0--