From: a.imamov@postgrespro.ru
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Potential issue in ecpg-informix decimal converting functions
Date: Wed, 06 Mar 2024 22:12:46 +0300
Message-ID: <eebf0ad50ad4321d65d2d64dd6b7f17d@postgrespro.ru> (raw)
In-Reply-To: <28B21E92-1688-40A4-BD86-A31316A22F50@yesql.se>
References: <54d2b53327516d9454daa5fb2f893bdc@postgrespro.ru>
<28064113-68CD-4C6E-BB6B-5E70C640F7D7@yesql.se>
<5c8b1b02d437c0e2ecdcea998ab1b79c@postgrespro.ru>
<ZdlDIJ6aYcTvwkfi@paquier.xyz>
<0352C4C6-FA8D-4DF9-AE0C-21C2BA75E0BA@yesql.se>
<Zd1uVlgbJ8BN7XbP@paquier.xyz>
<28B21E92-1688-40A4-BD86-A31316A22F50@yesql.se>
Daniel Gustafsson писал(а) 2024-03-06 18:03:
>> On 27 Feb 2024, at 06:08, Michael Paquier <michael@paquier.xyz> wrote:
>>
>> On Mon, Feb 26, 2024 at 12:28:51AM +0100, Daniel Gustafsson wrote:
>>> Yeah, I think this is for HEAD only, especially given the lack of
>>> complaints
>>> against backbranches.
>>
>> Daniel, are you planning to look at that? I haven't done any detailed
>> lookup, but would be happy to do so it that helps.
>
> I had a look at this today and opted for trimming back the patch a bit.
> Reading the informix docs the functions we are mimicking for
> compatibility here
> does not have an underflow returnvalue, so adding one doesn't seem
> right (or
> helpful). The attached fixes the return of overflow and leaves it at
> that,
> which makes it possible to backpatch since it's fixing the code to
> match the
> documented behavior.
>
> --
> Daniel Gustafsson
I agree with the proposed changes in favor of backward compatibility.
Also, is it a big deal that the PGTYPESnumeric_to_long() function
doesn't
exactly match the documentation, compared to PGTYPESnumeric_to_int()? It
handles underflow case separately and sets errno to
PGTYPES_NUM_UNDERFLOW
additionally.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: a.imamov@postgrespro.ru, daniel@yesql.se, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: Potential issue in ecpg-informix decimal converting functions
In-Reply-To: <eebf0ad50ad4321d65d2d64dd6b7f17d@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox