Re: many copies of atooid() and oid_cmp()

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: many copies of atooid() and oid_cmp()
Date: 2017-01-12 13:41:33
Message-ID: c480b0f7-5205-d5f3-326d-22352d835430@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/12/17 12:25 AM, Kuntal Ghosh wrote:
> On Wed, Jan 11, 2017 at 9:42 PM, Peter Eisentraut
> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>> There are approximately 11 copies of atooid() and 3 of oid_cmp() or
>> equivalent, and pending patches are proposing to add more. I propose
>> these two patches to collect them in central places.
>>
> I've verified that the patch covers all the copies of atooid() and
> oid_cmp() that should be replaced. However, as Tom suggested, I've
> looked into pg_dump and found that there is a oidcmp() as well. It may
> have been missed because it has a different name.
>
> I was wondering whether it is worth to replace the following as well:
> (TransactionId)strtoul(str, NULL, 16) to something like #define atotranid().

There is a atoxid(), which is actually not used and removed by my patch.
There are a few other calls of this pattern, but they are not frequent
or consistent enough to worry about (yet), I think.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2017-01-12 13:56:33 Re: [PATCH] Rename pg_switch_xlog to pg_switch_wal
Previous Message Peter Eisentraut 2017-01-12 13:39:29 Re: many copies of atooid() and oid_cmp()