Skip Menu |

This queue is for tickets about the Module-Build-Database CPAN distribution.

Report information
The Basics
Id: 126279
Status: resolved
Priority: 0/
Queue: Module-Build-Database

People
Owner: Nobody in particular
Requestors: ktipton [...] usgcrp.gov
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: pg_dump bug for PostgreSQL v9.3.22+
Date: Wed, 15 Aug 2018 16:04:16 -0400
To: bug-Module-Build-Database [...] rt.cpan.org
From: "Kathryn Tipton (Contractor)" <ktipton [...] usgcrp.gov>
Hello, PostgreSQL changed the way pg_dump handles the search_path in version 9.3.22, making it default to unset in the dumped sql. This isn't a problem if the tables have fully qualified table names with their schema. Currently Module::Build::Database::PostgreSQL trims off the schema component for some parts of the export at line 420: https://metacpan.org/source/BDUGGAN/Module-Build-Database-0.57/lib/Module/Build/Database/PostgreSQL.pm#L420 Would it be possible to remove that trimming? Thank you. Example Patch: diff --git a/PostgreSQL.pm b/PostgreSQL.pm index 02f75fe..0ef1d12 100644 --- a/PostgreSQL.pm +++ b/PostgreSQL.pm @@ -417,9 +417,6 @@ sub _dump_base_sql { and $_ !~ /^CREATE SCHEMA $database_schema;$/ and $_ !~ /^SET (search_path|lock_timeout)/ } @lines; - for (@lines) { - /alter table/i and s/$database_schema\.//; - } file($outfile)->spew(join '', @lines); if (@lines > 0 && !-s $outfile) { die "# Unable to write to $outfile"; -- Kat
Sure! Thanks for the patch -- I've turned this into a PR and sent a new version out to CPAN. https://github.com/bduggan/Module-Build-Database/pull/26 Brian
Subject: Re: [rt.cpan.org #126279] pg_dump bug for PostgreSQL v9.3.22+
Date: Thu, 16 Aug 2018 08:17:18 -0400
To: bug-Module-Build-Database [...] rt.cpan.org
From: "Kathryn Tipton (Contractor)" <ktipton [...] usgcrp.gov>
Thank you very much! On Wed, Aug 15, 2018, 10:04 PM Brian Duggan via RT < bug-Module-Build-Database@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=126279 > > > Sure! Thanks for the patch -- I've turned this into a PR and sent a new > version out to CPAN. > > https://github.com/bduggan/Module-Build-Database/pull/26 > > Brian >