Re: Postgres perl module namespace - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Postgres perl module namespace
Date
Msg-id 20210908040011.GA2476997@rfd.leadboat.com
Whole thread Raw
In response to Re: Postgres perl module namespace  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Postgres perl module namespace
List pgsql-hackers
On Tue, Sep 07, 2021 at 07:43:47AM -0400, Andrew Dunstan wrote:
> On 9/6/21 1:08 AM, Michael Paquier wrote:
> > On Sat, Sep 04, 2021 at 09:58:08AM -0400, Andrew Dunstan wrote:
> >> On 9/4/21 2:19 AM, Noah Misch wrote:
> >>> plperl uses PostgreSQL:: as the first component of its Perl module namespace.
> >>> We shouldn't use both PostgreSQL:: and Postgres:: in the same source tree, so
> >>> this change should not use Postgres::. 
> >> Good point. Here's the same thing using PostgreSQL::Test
> > A minor point: this introduces PostgreSQL::Test::PostgresVersion.
> > Could be this stripped down to PostgreSQL::Test::Version instead?
> 
> That name isn't very clear - what is it the version of, PostgreSQL or
> the test?

Fair.

> There's nothing very test-specific about this module - it simply
> encapsulates a Postgres version string. So maybe it should just be
> PostgreSQL::Version.

Could be fine, but that name could be useful as a CPAN module.  These modules
don't belong on CPAN, so I'd keep PostgreSQL::Test::PostgresVersion.  There's
only one reference in the tree, so optimizing that particular name is less
exciting.

(I wondered about using PGXS:: as the namespace for all these modules, since
it's short and "pgxs" is the closest thing to a name for the PostgreSQL build
system.  Overall, I didn't convince myself about it being an improvement.)



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Estimating HugePages Requirements?
Next
From: Laurenz Albe
Date:
Subject: Re: pgstat_send_connstats() introduces unnecessary timestamp and UDP overhead