Re: Potential issue in ecpg-informix decimal converting functions

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: a(dot)imamov(at)postgrespro(dot)ru, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Potential issue in ecpg-informix decimal converting functions
Date: 2024-03-06 15:03:59
Message-ID: 28B21E92-1688-40A4-BD86-A31316A22F50@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 27 Feb 2024, at 06:08, Michael Paquier <michael(at)paquier(dot)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

Attachment Content-Type Size
v3-0001-ecpg-Fix-return-code-for-overflow-in-numeric-conv.patch application/octet-stream 3.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2024-03-06 15:23:01 Re: Change prefetch and read strategies to use range in pg_prewarm ... and raise a question about posix_fadvise WILLNEED
Previous Message Ashutosh Bapat 2024-03-06 14:16:38 Re: [PoC] Reducing planning time when tables have many partitions