Re: Change atoi to strtol in same place

From: Joe Nelson <joe(at)begriffs(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: david(dot)rowley(at)2ndquadrant(dot)com, ashu(dot)coek88(at)gmail(dot)com, robertmhaas(at)gmail(dot)com, michael(at)paquier(dot)xyz, tomas(dot)vondra(at)2ndquadrant(dot)com, surafel3000(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org, alvherre(at)2ndquadrant(dot)com
Subject: Re: Change atoi to strtol in same place
Date: 2019-10-28 01:20:00
Message-ID: 20191028012000.GA59064@begriffs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kyotaro Horiguchi wrote:
> Doesn't the generic message work for all kinds of failure here?

Yeah it does now. I updated pg_strtoint64_range to generate the same
message for all errors.

> So I think we're reaching the simple solution where
> pg_strtoint64_range doesn't need to be involved in message building.

Even though there's only one message, it still seems best to have the
function create the error string. That way the string stays consistent
and isn't duplicated across the code.

--
Joe Nelson https://begriffs.com

Attachment Content-Type Size
atoi-to-strtol-v7.patch text/x-patch 26.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Benjamin Scherrey 2019-10-28 01:33:52 Re: PL/Python fails on new NetBSD/PPC 8.0 install
Previous Message Tom Lane 2019-10-28 01:11:47 Re: PL/Python fails on new NetBSD/PPC 8.0 install