Re: refactoring - share str2*int64 functions

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: refactoring - share str2*int64 functions
Date: 2019-07-15 23:44:09
Message-ID: 20190715234409.GA27419@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Jul-16, Thomas Munro wrote:

> On Mon, Jul 15, 2019 at 5:08 PM Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
> > The compromise I can offer is to change the name of the first one, say to
> > "pg_scanint8" to reflect its former backend name. Attached a v4 which does
> > a renaming so as to avoid the name similarity but signature difference. I
> > also made both error messages identical.
>
> Cool. I'm not exactly sure when we should include 'pg_' in identifier
> names. It seems to be used for functions/macros that wrap or replace
> something else with a similar name, like pg_pwrite(),
> pg_attribute_noreturn(), ... In this case it's just our own code that
> we're moving, so I'm wondering if we should just call it scanint8().

Isn't it annoying that pg_strtouint64() has an implementation that
suggests that it ought to be in src/port? The fact that the signatures
are so different suggests to me that we should indeed put them separate.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jerry Sievers 2019-07-15 23:48:05 SegFault on 9.6.14
Previous Message Thomas Munro 2019-07-15 23:43:32 Re: pgbench - add minimal stats on initialization