Re: TAP: allow overriding PostgresNode in get_new_node

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Chapman Flack <chap(at)anastigmatix(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
Subject: Re: TAP: allow overriding PostgresNode in get_new_node
Date: 2017-07-26 00:45:12
Message-ID: CAMsr+YGEaJqMON7e44iwM9OxPD2LU8PKdR6U6mi8mDwTxc0A+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26 July 2017 at 07:12, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:

> Chapman Flack wrote:
>
> > Any takers if I propose this amendment in the form of a patch?
> >
> > Relying on the perl idiom instead of a $node->isa() test shortens
> > the patch; does that ameliorate at all the concern about complicating
> > core for the benefit of modules?
>
> Yeah, I like this (I also got word from Abhijit Menon-Sen that this is a
> saner way to do it, which counts as +1000 at least.) This is how we
> should have built the method in the first place, rather than creating an
> exported function. Not sure how we missed that.
>
> I changed the POD docs so that the class method version is the preferred
> form, and the exported function usage "is just backwards compatibility".
> All current usage uses that form, but hey, we can updated these later
> (if at all).
>
> Pushed to 9.6 and HEAD.
>

Thanks.

An upvote from our resident Perl wizard certainly does help :)

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-07-26 00:54:37 Re: Syncing sql extension versions with shared library versions
Previous Message Craig Ringer 2017-07-26 00:44:05 Re: WIP: Failover Slots