Re: Postgres perl module namespace

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres perl module namespace
Date: 2021-09-03 19:34:24
Message-ID: ce3dc94c-2826-e2b3-42f7-dd0cecf9526c@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 8/25/21 10:08 AM, Robert Haas wrote:
> On Wed, Aug 25, 2021 at 1:48 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> On Mon, Aug 23, 2021 at 03:39:15PM -0400, Robert Haas wrote:
>>> On Mon, Aug 23, 2021 at 3:03 PM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>>>> OK, I count 3 in favor of changing to PgTest::Cluster, 1 against,
>>>> remainder don't care.
>>> I'd have gone with something starting with Postgres:: ... but I don't care much.
>> PgTest seems like a better choice to me, as "Postgres" could be used
>> for other purposes than a testing framework, and the argument that
>> multiple paths makes things annoying for hackers is sensible.
> I mean, it's a hierarchical namespace. The idea is you do
> Postgres::Test or Postgres::<whatever> and other people using the
> Postgres database can use other parts of it. But again, not really
> worth arguing about.
>

I think I have come around to this POV. Here's a patch. The worst of it
is changes like this:

- my $node2 = PostgresNode->new('replica');
+ my $node2 = Postgres::Test::Cluster->new('replica');
...
- TestLib::system_or_bail($tar, 'xf', $tblspc_tars[0], '-C', $repTsDir);
+ Postgres::Test::Utils::system_or_bail($tar, 'xf', $tblspc_tars[0], '-C', $repTsDir);

and I think that's not so bad.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
0001-move-perl-test-modules-to-Postgres-Test-namespace.patch text/x-patch 164.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-09-03 20:20:59 Re: Estimating HugePages Requirements?
Previous Message Daniel Gustafsson 2021-09-03 18:27:55 Re: Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...