Mailinglist Archive: opensuse-commit (1069 mails)
| < Previous | Next > |
commit perl-DBD-Pg for openSUSE:Factory
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Thu, 02 Dec 2010 16:58:49 +0100
- Message-id: <20101202155849.5512C201F5@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package perl-DBD-Pg for openSUSE:Factory
checked in at Thu Dec 2 16:58:49 CET 2010.
--------
--- perl-DBD-Pg/perl-DBD-Pg.changes 2010-04-21 16:19:49.000000000 +0200
+++ perl-DBD-Pg/perl-DBD-Pg.changes 2010-12-02 09:38:41.000000000 +0100
@@ -1,0 +2,20 @@
+Thu Dec 2 08:36:00 UTC 2010 - chris@xxxxxxxxxxxxxxxx
+
+- update to 2.17.2
+ - Support dequoting of hex bytea format for 9.0.
+ [Dagfinn Ilmari Mannsåker] (CPAN bug #60200).
+ - Don't PQclear on execute() if there is an active async query
+ [rweikusat at mssgmbh.com] (CPAN bug #58376)
+ - Allow data_sources() to accept any case-variant of 'dbi:Pg' (CPAN bug
#61574)
+ - Fix failing test in t/04misc.t on Perl 5.12. [Eric Simon]
+ - Fix for some 7.4 failing tests [Dagfinn Ilmari Mannsåker]
+ - Return bare instead of undef in test connections (CPAN bug #61574)
+- recreated by cpanspec 1.78
+- removed Authors
+
+-------------------------------------------------------------------
+Wed Dec 1 13:31:52 UTC 2010 - coolo@xxxxxxxxxx
+
+- switch to perl_requires macro
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
DBD-Pg-2.17.1.tar.bz2
New:
----
DBD-Pg-2.17.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-DBD-Pg.spec ++++++
--- /var/tmp/diff_new_pack.w8ONJr/_old 2010-12-02 16:33:29.000000000 +0100
+++ /var/tmp/diff_new_pack.w8ONJr/_new 2010-12-02 16:33:29.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package perl-DBD-Pg (Version 2.17.1)
+# spec file for package perl-DBD-Pg (Version 2.17.2)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,13 +19,15 @@
Name: perl-DBD-Pg
+%define cpan_name DBD-Pg
Summary: PostgreSQL database driver for the DBI module
-Version: 2.17.1
+Version: 2.17.2
Release: 1
-License: GPLv2+
+License: GPL+ or Artistic
Group: Development/Libraries/Perl
-Url: http://search.perl.com/dist/DBD-Pg
-Source0: DBD-Pg-%{version}.tar.bz2
+Url: http://search.cpan.org/dist/DBD-Pg/
+#Source:
http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-2.17.2.tar.gz
+Source: %{cpan_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: openssl-devel
## TestSuite broken for postgresql < 8.4
@@ -41,29 +43,48 @@
BuildRequires: perl(Test::More) >= 0.61
BuildRequires: perl(DBI) >= 1.52
BuildRequires: perl(version)
-Requires: perl = %{perl_version}
+#
+#BuildRequires: perl(Cwd)
+#BuildRequires: perl(File::Comments)
+#BuildRequires: perl(File::Comments::Plugin::C)
+#BuildRequires: perl(File::Temp)
+#BuildRequires: perl(Module::Signature) >= 0.50
+#BuildRequires: perl(Perl::Critic)
+#BuildRequires: perl(Pod::Spell)
+#BuildRequires: perl(Test::Pod) >= 0.95
+#BuildRequires: perl(Test::Pod::Coverage)
+#BuildRequires: perl(Test::Warn) >= 0.08
+#BuildRequires: perl(Test::YAML::Meta) >= 0.03
+#BuildRequires: perl(Text::SpellChecker)
+#
+%{perl_requires}
Requires: perl(DBI) >= 1.52
Requires: perl(version)
+#
+#Recommends: perl(Cwd)
+#Recommends: perl(File::Comments)
+#Recommends: perl(File::Comments::Plugin::C)
+#Recommends: perl(File::Temp)
+#Suggests: perl(Module::Signature) >= 0.50
+#Suggests: perl(Perl::Critic)
+#Suggests: perl(Pod::Spell)
+#Suggests: perl(Test::Pod) >= 0.95
+#Suggests: perl(Test::Pod::Coverage)
+#Suggests: perl(Test::Warn) >= 0.08
+#Suggests: perl(Test::YAML::Meta) >= 0.03
+#Recommends: perl(Text::SpellChecker)
%description
-This driver is needed to access PostgreSQL databases from Perl programs
-through the Perl Database Interface (DBI).
-
-
-
-Authors:
---------
- Edmund Mergl
- Jeffrey W. Baker
- Tim Bunce
+DBD::Pg is a Perl module that works with the DBI module to provide access
+to PostgreSQL databases.
%prep
-%setup -q -n DBD-Pg-%{version}
+%setup -q -n %{cpan_name}-%{version}
%build
export POSTGRES_INCLUDE=/usr/include/pgsql
export POSTGRES_LIB="%{_libdir} -lssl"
-%{__perl} Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
+%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%{__make} %{?_smp_mflags}
%check
@@ -71,11 +92,21 @@
%install
%perl_make_install
+### since 11.4 perl_process_packlist
+### removes .packlist, perllocal.pod files
+%if 0%{?suse_version} > 1130
%perl_process_packlist
+%else
+# do not perl_process_packlist
+# remove .packlist file
+%{__rm} -f $RPM_BUILD_ROOT%perl_vendorarch/auto/DBD/Pg/.packlist
+# remove perllocal.pod file
+%{__rm} -f $RPM_BUILD_ROOT%perl_archlib/perllocal.pod
+%endif
%perl_gen_filelist
%clean
-%{__rm} -rf %{buildroot}
+%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
++++++ DBD-Pg-2.17.1.tar.bz2 -> DBD-Pg-2.17.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/Changes new/DBD-Pg-2.17.2/Changes
--- old/DBD-Pg-2.17.1/Changes 2010-04-08 17:29:06.000000000 +0200
+++ new/DBD-Pg-2.17.2/Changes 2010-11-21 06:13:27.000000000 +0100
@@ -1,6 +1,17 @@
'GSM' is Greg Sabino Mullane, greg@xxxxxxxxxxxx)
-2.17.1 Released April 8, 2010
+2.17.2 Released November 21, 2010
+
+ - Support dequoting of hex bytea format for 9.0.
+ [Dagfinn Ilmari Mannsåker] (CPAN bug #60200).
+ - Don't PQclear on execute() if there is an active async query
+ [rweikusat at mssgmbh.com] (CPAN bug #58376)
+ - Allow data_sources() to accept any case-variant of 'dbi:Pg' (CPAN bug
#61574)
+ - Fix failing test in t/04misc.t on Perl 5.12. [Eric Simon]
+ - Fix for some 7.4 failing tests [Dagfinn Ilmari Mannsåker]
+ - Return bare instead of undef in test connections (CPAN bug #61574)
+
+2.17.1 Released April 8, 2010 (subversion r13899)
- Only use lo_import_with_oid if Postgres libraries are 8.4 or better
[GSM] (CPAN bug #56363)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/META.yml new/DBD-Pg-2.17.2/META.yml
--- old/DBD-Pg-2.17.1/META.yml 2010-04-07 22:51:27.000000000 +0200
+++ new/DBD-Pg-2.17.2/META.yml 2010-11-21 03:49:54.000000000 +0100
@@ -1,6 +1,6 @@
--- #YAML:1.0
name : DBD-Pg
-version : 2.17.1
+version : 2.17.2
abstract : DBI PostgreSQL interface
author:
- Greg Sabino Mullane <greg@xxxxxxxxxxxx>
@@ -39,10 +39,10 @@
provides:
DBD::Pg:
file : Pg.pm
- version : 2.17.1
+ version : 2.17.2
Bundle::DBD::Pg:
file : lib/Bundle/DBD/Pg.pm
- version : 2.17.1
+ version : 2.17.2
keywords:
- Postgres
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/Makefile.PL
new/DBD-Pg-2.17.2/Makefile.PL
--- old/DBD-Pg-2.17.1/Makefile.PL 2010-04-07 22:52:55.000000000 +0200
+++ new/DBD-Pg-2.17.2/Makefile.PL 2010-11-21 05:19:19.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.PL 13896 2010-04-07 20:52:54Z turnstep $
+# $Id: Makefile.PL 14532 2010-11-21 04:19:18Z turnstep $
use ExtUtils::MakeMaker;
use Config;
@@ -7,30 +7,30 @@
use 5.006001;
## No version.pm for this one, as the prereqs are not loaded yet.
-my $VERSION = '2.17.1';
+my $VERSION = '2.17.2';
my $lib;
BEGIN {
- use vars qw/$sep/;
+ use vars qw/$sep/;
my %sep = (
- MacOS => ':',
+ MacOS => ':',
MSWin32 => '\\',
os2 => '\\',
VMS => '\\',
NetWare => '\\',
dos => '\\',
- );
+ );
$sep = $sep{$^O} || '/';
$lib = join $sep, 't', 'lib';
}
use lib $lib;
if ($VERSION =~ /_/) {
- print "WARNING! This is a test version ($VERSION) and should not be
used in production!\n";
+ print "WARNING! This is a test version ($VERSION) and should not be used
in production!\n";
}
if (grep { /help/ } @ARGV) {
- print qq{
+ print qq{
Usage: perl $0
No other options are necessary, although you may need to
@@ -59,7 +59,7 @@
If all else fails, email dbd-pg\@perl.org for help.
};
- exit 1;
+ exit 1;
}
@@ -75,20 +75,20 @@
my $p = App::Info::Handler::Prompt->new;
my $pg = App::Info::RDBMS::PostgreSQL->new(on_unknown => $p);
my ($major_ver, $minor_ver, $patch, $conf, $bindir) = map {$pg->$_}
- qw/major_version minor_version patch_version configure bin_dir/;
+ qw/major_version minor_version patch_version configure bin_dir/;
my $initdb = '';
if (defined $bindir and -d $bindir) {
- my $testinitdb = "$bindir${sep}initdb";
- if (-e $testinitdb) {
- $initdb = $testinitdb;
- }
+ my $testinitdb = "$bindir${sep}initdb";
+ if (-e $testinitdb) {
+ $initdb = $testinitdb;
+ }
}
my $serverversion = 0;
my $defaultport = 0;
if (defined $major_ver) {
- $serverversion = sprintf '%d%.02d%.02d', $major_ver, $minor_ver, $patch;
- $defaultport = $conf =~ /with-pgport=(\d+)/ ? $1 : 5432;
+ $serverversion = sprintf '%d%.02d%.02d', $major_ver, $minor_ver, $patch;
+ $defaultport = $conf =~ /with-pgport=(\d+)/ ? $1 : 5432;
}
# We set POSTGRES_INCLUDE and POSTGRES_LIB from the first found of:
@@ -112,107 +112,107 @@
my $baddir = 0;
sub does_path_exist {
- my ($path_name, $path) = @_;
+ my ($path_name, $path) = @_;
- return if ! defined $path or ! length $path or -d $path;
- printf "The value of %s points to a non-existent directory: %s\n",
- $path_name, $path;
- $baddir++;
- return;
+ return if ! defined $path or ! length $path or -d $path;
+ printf "The value of %s points to a non-existent directory: %s\n",
+ $path_name, $path;
+ $baddir++;
+ return;
}
does_path_exist('POSTGRES_HOME', $ENV{POSTGRES_HOME});
does_path_exist('POSTGRES_INCLUDE', $POSTGRES_INCLUDE);
if ($baddir) {
- print "Cannot build unless the directories exist, exiting.\n";
- exit 0;
+ print "Cannot build unless the directories exist, exiting.\n";
+ exit 0;
}
if ($serverversion < 11) {
- print "Could not determine the PostgreSQL library version.\n".
- "Please ensure that a valid path is given to the 'pg_config'
command,\n".
- "either manually or by setting the environment
variables\n".
- "POSTGRES_DATA, POSTGRES_INCLUDE, and
POSTGRES_LIB\n";
- exit 0;
+ print "Could not determine the PostgreSQL library version.\n".
+ "Please ensure that a valid path is given to the 'pg_config' command,\n".
+ "either manually or by setting the environment variables\n".
+ "POSTGRES_DATA, POSTGRES_INCLUDE, and POSTGRES_LIB\n";
+ exit 0;
}
if ($os =~ /Win32/) {
- for ($POSTGRES_INCLUDE, $POSTGRES_LIB) {
- $_ = qq{"$_"} if index $_,'"';
- }
+ for ($POSTGRES_INCLUDE, $POSTGRES_LIB) {
+ $_ = qq{"$_"} if index $_,'"';
+ }
}
## Warn about older versions
if ($serverversion < 70400) {
- print "\n****************\n";
- print "WARNING! DBD::Pg no longer supports versions less than 7.4.\n";
- print "You must upgrade PostgreSQL to a newer version.\n";
- print "****************\n\n";
- exit 1;
+ print "\n****************\n";
+ print "WARNING! DBD::Pg no longer supports versions less than 7.4.\n";
+ print "You must upgrade PostgreSQL to a newer version.\n";
+ print "****************\n\n";
+ exit 1;
}
my $dbi_arch_dir;
{
- eval {
- require DBI::DBD;
- };
- if ($@) {
- print "Could not load DBI::DBD - is the DBI module
installed?\n";
- exit 0;
- }
- local *STDOUT; ## Prevent duplicate debug info as WriteMakefile also
calls this
- $dbi_arch_dir = DBI::DBD::dbd_dbi_arch_dir();
+ eval {
+ require DBI::DBD;
+ };
+ if ($@) {
+ print "Could not load DBI::DBD - is the DBI module installed?\n";
+ exit 0;
+ }
+ local *STDOUT; ## Prevent duplicate debug info as WriteMakefile also calls
this
+ $dbi_arch_dir = DBI::DBD::dbd_dbi_arch_dir();
}
my $defines = " -DPGLIBVERSION=$serverversion -DPGDEFPORT=$defaultport";
my $comp_opts = $Config{q{ccflags}} . $defines;
if ($ENV{DBDPG_GCCDEBUG}) {
- warn "Enabling many compiler options\n";
- $comp_opts .= ' -Wchar-subscripts -Wcomment';
- $comp_opts .= ' -Wformat=2'; ## does
-Wformat,-Wformat-y2k,-Wformat-nonliteral,-Wformat-security
- $comp_opts .= ' -Wnonnull';
- $comp_opts .= ' -Wuninitialized -Winit-self'; ## latter requires the
former
- $comp_opts .= ' -Wimplicit'; ## does -Wimplicit-int and
-Wimplicit-function-declaration
- $comp_opts .= ' -Wmain -Wmissing-braces -Wparentheses -Wsequence-point
-Wreturn-type -Wswitch -Wswitch-enum -Wtrigraphs';
- $comp_opts .= ' -Wunused'; ## contains -Wunused-
function,label,parameter,variable,value
- $comp_opts .= ' -Wunknown-pragmas -Wstrict-aliasing';
- $comp_opts .= ' -Wall'; ## all of above, but we enumerate anyway
- $comp_opts .= ' -Wextra -Wdeclaration-after-statement -Wendif-labels
-Wpointer-arith';
- $comp_opts .= ' -Wbad-function-cast -Wcast-qual -Wcast-align
-Wsign-compare -Waggregate-return';
- $comp_opts .= ' -Wmissing-prototypes -Wmissing-declarations
-Wmissing-format-attribute -Wpacked -Winline -Winvalid-pch';
- $comp_opts .= ' -Wdisabled-optimization';
- $comp_opts .= ' -Wnested-externs';
- $comp_opts .= " -Wstrict-prototypes"; ## Still hits a couple places in
types.h
- $comp_opts .= " -Wswitch-default";
- $comp_opts .= " -Wsystem-headers";
- $comp_opts .= " -Wmissing-noreturn";
- $comp_opts .= " -Wfloat-equal"; ## Does not like SvTRUE() calls
- $comp_opts .= " -Wpadded"; ## Use when adding/changing our structs
+ warn "Enabling many compiler options\n";
+ $comp_opts .= ' -Wchar-subscripts -Wcomment';
+ $comp_opts .= ' -Wformat=2'; ## does
-Wformat,-Wformat-y2k,-Wformat-nonliteral,-Wformat-security
+ $comp_opts .= ' -Wnonnull';
+ $comp_opts .= ' -Wuninitialized -Winit-self'; ## latter requires the former
+ $comp_opts .= ' -Wimplicit'; ## does -Wimplicit-int and
-Wimplicit-function-declaration
+ $comp_opts .= ' -Wmain -Wmissing-braces -Wparentheses -Wsequence-point
-Wreturn-type -Wswitch -Wswitch-enum -Wtrigraphs';
+ $comp_opts .= ' -Wunused'; ## contains -Wunused-
function,label,parameter,variable,value
+ $comp_opts .= ' -Wunknown-pragmas -Wstrict-aliasing';
+ $comp_opts .= ' -Wall'; ## all of above, but we enumerate anyway
+ $comp_opts .= ' -Wextra -Wdeclaration-after-statement -Wendif-labels
-Wpointer-arith';
+ $comp_opts .= ' -Wbad-function-cast -Wcast-qual -Wcast-align
-Wsign-compare -Waggregate-return';
+ $comp_opts .= ' -Wmissing-prototypes -Wmissing-declarations
-Wmissing-format-attribute -Wpacked -Winline -Winvalid-pch';
+ $comp_opts .= ' -Wdisabled-optimization';
+ $comp_opts .= ' -Wnested-externs';
+ $comp_opts .= " -Wstrict-prototypes"; ## Still hits a couple places in
types.h
+ $comp_opts .= " -Wswitch-default";
+ $comp_opts .= " -Wsystem-headers";
+ $comp_opts .= " -Wmissing-noreturn";
+ $comp_opts .= " -Wfloat-equal"; ## Does not like SvTRUE() calls
+ $comp_opts .= " -Wpadded"; ## Use when adding/changing our structs
}
my %opts =
- (
- NAME => 'DBD::Pg',
- VERSION_FROM => 'Pg.pm',
- INC => "-I$POSTGRES_INCLUDE -I$dbi_arch_dir",
- OBJECT => "Pg\$(OBJ_EXT) dbdimp\$(OBJ_EXT) quote\$(OBJ_EXT)
types\$(OBJ_EXT)",
- LIBS => ["-L$POSTGRES_LIB -lpq -lm"],
- AUTHOR => 'Greg Sabino Mullane',
- ABSTRACT => 'PostgreSQL database driver for the DBI module',
- PREREQ_PM => {
- 'ExtUtils::MakeMaker' => '6.11',
- 'DBI' => '1.52',
- 'Test::More' => '0.61',
- 'version' => '0',
- },
- CCFLAGS => $comp_opts,
- PERL_MALLOC_OK => 1,
- NEEDS_LINKING => 1,
- NO_META => 1,
+ (
+ NAME => 'DBD::Pg',
+ VERSION_FROM => 'Pg.pm',
+ INC => "-I$POSTGRES_INCLUDE -I$dbi_arch_dir",
+ OBJECT => "Pg\$(OBJ_EXT) dbdimp\$(OBJ_EXT) quote\$(OBJ_EXT)
types\$(OBJ_EXT)",
+ LIBS => ["-L$POSTGRES_LIB -lpq -lm"],
+ AUTHOR => 'Greg Sabino Mullane',
+ ABSTRACT => 'PostgreSQL database driver for the DBI module',
+ PREREQ_PM => {
+ 'ExtUtils::MakeMaker' => '6.11',
+ 'DBI' => '1.52',
+ 'Test::More' => '0.61',
+ 'version' => '0',
+ },
+ CCFLAGS => $comp_opts,
+ PERL_MALLOC_OK => 1,
+ NEEDS_LINKING => 1,
+ NO_META => 1,
NORECURS => 1,
- clean => { FILES => 'trace Pg.xsi README.testdatabase' },
+ clean => { FILES => 'trace Pg.xsi README.testdatabase' },
realclean => { FILES => 'dbdpg_test_database/' },
);
@@ -224,9 +224,9 @@
}
}
elsif ($os =~ /Win32/) {
- my $msdir = $POSTGRES_LIB;
- $msdir =~ s{"$}{/ms"};
- $opts{LIBS}[0] .= " -L$msdir -lsecur32";
+ my $msdir = $POSTGRES_LIB;
+ $msdir =~ s{"$}{/ms"};
+ $opts{LIBS}[0] .= " -L$msdir -lsecur32";
}
if ($Config{dlsrc} =~ /dl_none/) {
@@ -234,37 +234,37 @@
}
{
- package MY; ## no critic
- sub MY::test { ## no critic
- my $string = shift->SUPER::test(@_);
- $string =~ s/(PERL_DL_NONLAZY=1)/PGINITDB="$initdb" $1/g;
- return $string;
- }
+ package MY; ## no critic
+ sub MY::test { ## no critic
+ my $string = shift->SUPER::test(@_);
+ $string =~ s/(PERL_DL_NONLAZY=1)/PGINITDB="$initdb" $1/g;
+ return $string;
+ }
}
sub constants {
- my $self = shift;
+ my $self = shift;
- my $old_constants = $self->SUPER::constants();
- my $new_constants = '';
- for my $line (split /\n/ => $old_constants) {
- if ($line =~ /^INC = .*strawberry.*/ ) {
- print qq(Strawberry Perl found; adjusting the INC
variable;\n);
- $line . ' -I ' . DBI::DBD::dbd_dbi_arch_dir();
- print qq(INC is now $line\n);
- }
- $new_constants .= "$line\n";
- }
- return $new_constants;
+ my $old_constants = $self->SUPER::constants();
+ my $new_constants = '';
+ for my $line (split /\n/ => $old_constants) {
+ if ($line =~ /^INC = .*strawberry.*/ ) {
+ print qq(Strawberry Perl found; adjusting the INC variable;\n);
+ $line . ' -I ' . DBI::DBD::dbd_dbi_arch_dir();
+ print qq(INC is now $line\n);
+ }
+ $new_constants .= "$line\n";
+ }
+ return $new_constants;
}
sub MY::postamble { ## no critic ProhibitQualifiedSubDeclarations
- no strict 'subs'; ## no critic ProhibitNoStrict
- my $string = DBI::DBD->dbd_postamble();
- use strict 'subs';
- ## Evil, evil stuff - but we really want to suppress the "duplicate
function" message!
- $string =~ s/dependancy/dependency/g; ## why not, while we are here
- $string =~ s{(BASEEXT\)/g)}{$1; s/^do\\\(/dontdo\\\(/};
+ no strict 'subs'; ## no critic ProhibitNoStrict
+ my $string = DBI::DBD->dbd_postamble();
+ use strict 'subs';
+ ## Evil, evil stuff - but we really want to suppress the "duplicate
function" message!
+ $string =~ s/dependancy/dependency/g; ## why not, while we are here
+ $string =~ s{(BASEEXT\)/g)}{$1; s/^do\\\(/dontdo\\\(/};
my $tags = <<'MAKE_FRAG';
.PHONY: tags
@@ -312,21 +312,21 @@
MAKE_SPLINT
- $string =~ s/SDEFINES = /SDEFINES =$defines/;
+ $string =~ s/SDEFINES = /SDEFINES =$defines/;
- return $string;
+ return $string;
}
my $output = WriteMakefile(%opts);
if (!exists $output->{EXTRALIBS} or
- ($output->{EXTRALIBS} !~ /\-lpq/ and $output->{EXTRALIBS} !~ /libpq/)) {
+ ($output->{EXTRALIBS} !~ /\-lpq/ and $output->{EXTRALIBS} !~ /libpq/)) {
- my $makefile = exists $output->{MAKEFILE}
- ? "\nRemoving ($output->{MAKEFILE})\n" : '';
+ my $makefile = exists $output->{MAKEFILE}
+ ? "\nRemoving ($output->{MAKEFILE})\n" : '';
- warn qq{
+ warn qq{
==========================================================
WARNING! No libpq libraries were detected!
@@ -339,10 +339,10 @@
};
- ## Do not let make proceed
- unlink $output->{MAKEFILE} if $makefile;
+ ## Do not let make proceed
+ unlink $output->{MAKEFILE} if $makefile;
- exit 1;
+ exit 1;
}
exit 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/Pg.pm new/DBD-Pg-2.17.2/Pg.pm
--- old/DBD-Pg-2.17.1/Pg.pm 2010-04-07 22:52:55.000000000 +0200
+++ new/DBD-Pg-2.17.2/Pg.pm 2010-11-21 05:44:41.000000000 +0100
@@ -1,5 +1,5 @@
# -*-cperl-*-
-# $Id: Pg.pm 13896 2010-04-07 20:52:54Z turnstep $
+# $Id: Pg.pm 14533 2010-11-21 04:44:41Z turnstep $
#
# Copyright (c) 2002-2010 Greg Sabino Mullane and others: see the Changes file
# Portions Copyright (c) 2002 Jeffrey W. Baker
@@ -17,7 +17,7 @@
{
package DBD::Pg;
- use version; our $VERSION = qv('2.17.1');
+ use version; our $VERSION = qv('2.17.2');
use DBI ();
use DynaLoader ();
@@ -132,7 +132,7 @@
DBD::Pg::db->install_method('pg_putline');
DBD::Pg::db->install_method('pg_ready');
DBD::Pg::db->install_method('pg_release');
- DBD::Pg::db->install_method('pg_result');
+ DBD::Pg::db->install_method('pg_result'); ## NOT duplicated
below!
DBD::Pg::db->install_method('pg_rollback_to');
DBD::Pg::db->install_method('pg_savepoint');
DBD::Pg::db->install_method('pg_server_trace');
@@ -178,13 +178,13 @@
## Future: connect to "postgres" when the minimum version we
support is 8.0
my $connstring = 'dbname=template1';
if ($ENV{DBI_DSN}) {
- ($connstring = $ENV{DBI_DSN}) =~ s/dbi:Pg://;
+ ($connstring = $ENV{DBI_DSN}) =~ s/dbi:Pg://i;
}
if (length $attr) {
$connstring .= ";$attr";
}
- my $dbh = DBD::Pg::dr::connect($drh, $connstring) or return
undef;
+ my $dbh = DBD::Pg::dr::connect($drh, $connstring) or return;
$dbh->{AutoCommit}=1;
my $SQL = 'SELECT pg_catalog.quote_ident(datname) FROM
pg_catalog.pg_database ORDER BY 1';
my $sth = $dbh->prepare($SQL);
@@ -1732,7 +1732,7 @@
=head1 VERSION
-This documents version 2.17.1 of the DBD::Pg module
+This documents version 2.17.2 of the DBD::Pg module
=head1 DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/README new/DBD-Pg-2.17.2/README
--- old/DBD-Pg-2.17.1/README 2010-04-07 22:51:41.000000000 +0200
+++ new/DBD-Pg-2.17.2/README 2010-11-21 03:50:04.000000000 +0100
@@ -6,7 +6,7 @@
DESCRIPTION:
------------
-This is version 2.17.1 of DBD::Pg, the Perl interface to Postgres using DBI.
+This is version 2.17.2 of DBD::Pg, the Perl interface to Postgres using DBI.
The web site for this interface, and the latest version, can be found at:
http://search.cpan.org/dist/DBD-Pg/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/SIGNATURE new/DBD-Pg-2.17.2/SIGNATURE
--- old/DBD-Pg-2.17.1/SIGNATURE 2010-04-08 17:29:45.000000000 +0200
+++ new/DBD-Pg-2.17.2/SIGNATURE 2010-11-21 06:13:45.000000000 +0100
@@ -15,42 +15,42 @@
Hash: RIPEMD160
SHA1 415d25a8628815a50a8f79317de4abff11ac73e8 .perlcriticrc
-SHA1 9cdb9b0cd283c026f2bb186e44aefb0b9b7d23d1 Changes
+SHA1 8f288d6345275fc4a0c98f1b8690dae54cad0992 Changes
SHA1 21bc5f3c797d4d5b72285198ffeb1e4e1f0a2902 LICENSES/artistic.txt
SHA1 06877624ea5c77efe3b7e39b0f909eda6e25a4ec LICENSES/gpl-2.0.txt
SHA1 4025b3973c4a10c37fc7ad2f7a63fd9faa36f599 MANIFEST
SHA1 dc863ce481b321833db84c95bbe976e8c65f296e MANIFEST.SKIP
-SHA1 7464411288953e5ceac6439342d3fdf75977a32e META.yml
-SHA1 a2987d72ba262125871a394e68bc6852841b57a6 Makefile.PL
+SHA1 2de9cfea24742ddc923fa123152504a101667917 META.yml
+SHA1 17c9e74848588449ebce13600aa9bf81db331cce Makefile.PL
SHA1 85c2b29c21312a022524a730f26b2c4b30fc4211 Pg.h
-SHA1 eaf35f2b3279536708a21367e13743eff716a211 Pg.pm
+SHA1 050ce44ddcf4afb2b9dd2b22c107e82830e70dcb Pg.pm
SHA1 4a89e8770e3b1e83cee5150b1b5daa32e099d1b0 Pg.xs
-SHA1 17393c3b0b0bd38b4aa1fb2287f4e0cfc96fffda README
+SHA1 6de12403b3f85350964e4f850e515604fe0b02fb README
SHA1 4078d5452d087f83c7f43915fd329a51e66b0f6a README.dev
SHA1 7e213bf90f513595b59c0a2c4ef94fea1592efcf README.win32
SHA1 7330c41dd3a581aee4e1ca862b7403450454ce77 TODO
-SHA1 86cdf1a5369a98f096205eeb3fc5ef077b8baf1c dbdimp.c
+SHA1 787d6fb74e8bc07e6525995a76bc2bec64234223 dbdimp.c
SHA1 778794bc7eea7ad15ed3e933eb98f1e1e9875ec4 dbdimp.h
SHA1 6c33bcf138e577722283bef02fceb8cbce4d100d dbivport.h
-SHA1 00122f291c761dbaab476547ba36a0e510972794 lib/Bundle/DBD/Pg.pm
-SHA1 11dc1f05bf7dc7e97d2ffe4796367506a0f86c9d quote.c
-SHA1 54f10c6d76db2f2bfbaa7f345d7034029b88453c quote.h
+SHA1 2321a0c9cd79ff5afa707f5597681ae3a86cfcab lib/Bundle/DBD/Pg.pm
+SHA1 a6ba19441e4701bd16ab3bd5dd79cfc8de04d520 quote.c
+SHA1 7ccff1056809e35bcc1a3ff4f5a3d337f207681f quote.h
SHA1 93aa7e8cae0a361d1e6163dea0281ebff41f3c5f t/00-signature.t
SHA1 073baf503a601ceeb49516d61bd275f0c1e51563 t/00basic.t
-SHA1 84fdf16d76249725a42a06916ec9550d1ea30538 t/01connect.t
+SHA1 32c8889d6cff8b3e1f20fa3894afcc12c9a1a69a t/01connect.t
SHA1 1e0d8cad9de0063d4258739f6c8eb2cee27d9937 t/01constants.t
-SHA1 01f352b31c7d68eeb09cf3b65a88cb09d95af341 t/02attribs.t
-SHA1 ae6cc3d2c6965ba03a0da89c50f26e7aa613de5f t/03dbmethod.t
-SHA1 56c1dbf645c0849ad10ec7fc9542a4a4bed11f47 t/03smethod.t
-SHA1 910d6c2234d77a74a49cf189b6c799e13bf75280 t/04misc.t
-SHA1 b49f2234aa5070ab5b5020e5eae67eb1967facb0 t/06bytea.t
-SHA1 e55c0c4bf65b8d25dff7b7c9fed429fb8d07259b t/07copy.t
-SHA1 3aa283c6065bc2a7b734fc4c7d1f21ac79acfdde t/08async.t
-SHA1 dbbb66906bed8f24879ad757e58be889ac4cee4d t/09arrays.t
-SHA1 8166901700f235266adee5ad12d76ebe6f00cf3d t/12placeholders.t
-SHA1 85b5df8ef0c78b1d2d0018d874c62af7ef01a28f t/20savepoints.t
-SHA1 35e3cc228bb48e23a5f1ef74d10a78b87ec64b73 t/99cleanup.t
-SHA1 7558842ed61067efcbc7065f72c808f63c689238 t/dbdpg_test_setup.pl
+SHA1 a91ede67fd2f217bef7ed9884be46805b1937260 t/02attribs.t
+SHA1 a5dc8b84fcc8b10dc6ae21ed38cbfcdfdb13e1ee t/03dbmethod.t
+SHA1 f8e2c2bec8fbbf67688335f53bfbc3957829f70c t/03smethod.t
+SHA1 723db2e94914a5739c867f5b2b0151cced63d614 t/04misc.t
+SHA1 95041ea7be83c2114b0d514af54ff68e016e284f t/06bytea.t
+SHA1 66b36d9f81bf6d9d90b9275ae8ba4b9141839c06 t/07copy.t
+SHA1 4045d11ab0cf6ca600dffe0959ef463e9432459c t/08async.t
+SHA1 cf810431f2845e1655d123d133ffc5dde0a190a4 t/09arrays.t
+SHA1 c02e05f73b4fff94b454b19adca28e42493e67a0 t/12placeholders.t
+SHA1 81558ca5c783ea6792fd103444a04df615a8d127 t/20savepoints.t
+SHA1 dfef0062e9549b2cad7b429c7214734ab6ab5a4a t/99cleanup.t
+SHA1 016dc9f5f85715a93527cface780a920c463f3cd t/dbdpg_test_setup.pl
SHA1 30b4c1b0a41123bbbdc690588a2fdb319023bf0c t/lib/App/Info.pm
SHA1 94cd383136553746ff12128aa367fb71e98087df t/lib/App/Info/Handler.pm
SHA1 b5bf85b12a5fc207c44113a9c028fb7fbd68531f t/lib/App/Info/Handler/Prompt.pm
@@ -63,7 +63,7 @@
SHA1 f07cd5ecaeb854c81ceb9206364979cf607e6546 win32.mak
-----BEGIN PGP SIGNATURE-----
-iEYEAREDAAYFAku99mkACgkQvJuQZxSWSsiF3wCdF0ETaog2ugY8PZ9QbBhE9rFi
-+vUAoO33Zj+q7bG6JpJ+KhwkOHizawL8
-=zX3/
+iEYEAREDAAYFAkzoqokACgkQvJuQZxSWSsjPKACgili1ADcepd33XabLz9M6aq+i
+qCQAn0lorEIboGtsuCuWE192FqIZ5gpI
+=aWzv
-----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/dbdimp.c new/DBD-Pg-2.17.2/dbdimp.c
--- old/DBD-Pg-2.17.1/dbdimp.c 2010-04-07 22:49:52.000000000 +0200
+++ new/DBD-Pg-2.17.2/dbdimp.c 2010-11-21 06:03:00.000000000 +0100
@@ -1,6 +1,6 @@
/*
- $Id: dbdimp.c 13895 2010-04-07 20:49:50Z turnstep $
+ $Id: dbdimp.c 14538 2010-11-21 05:03:00Z turnstep $
Copyright (c) 2002-2010 Greg Sabino Mullane and others: see the Changes file
Portions Copyright (c) 2002 Jeffrey W. Baker
@@ -2910,8 +2910,13 @@
}
}
- /* clear old result (if any) */
- if (imp_sth->result) {
+ /*
+ Clear old result (if any), except if starting the
+ query asynchronously. Old async results will be
+ deleted implicitly the next time pg_db_result is
+ called.
+ */
+ if (imp_sth->result && !(imp_sth->async_flag & PG_ASYNC)) {
TRACE_PQCLEAR;
PQclear(imp_sth->result);
imp_sth->result = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/lib/Bundle/DBD/Pg.pm
new/DBD-Pg-2.17.2/lib/Bundle/DBD/Pg.pm
--- old/DBD-Pg-2.17.1/lib/Bundle/DBD/Pg.pm 2010-04-07 22:51:14.000000000
+0200
+++ new/DBD-Pg-2.17.2/lib/Bundle/DBD/Pg.pm 2010-11-21 03:49:33.000000000
+0100
@@ -4,7 +4,7 @@
use strict;
use warnings;
-$VERSION = '2.17.1';
+$VERSION = '2.17.2';
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/quote.c new/DBD-Pg-2.17.2/quote.c
--- old/DBD-Pg-2.17.1/quote.c 2010-01-20 20:19:07.000000000 +0100
+++ new/DBD-Pg-2.17.2/quote.c 2010-11-21 03:34:08.000000000 +0100
@@ -1,6 +1,6 @@
/*
- $Id: quote.c 13752 2010-01-20 19:19:06Z turnstep $
+ $Id: quote.c 14471 2010-10-09 05:33:58Z machack666 $
Copyright (c) 2003-2010 Greg Sabino Mullane and others: see the Changes file
@@ -322,7 +322,7 @@
return result;
}
-char * quote_float(const char *string, STRLEN len, STRLEN *retlen, int estring)
+char * quote_float(char *string, STRLEN len, STRLEN *retlen, int estring)
{
dTHX;
char * result;
@@ -442,7 +442,7 @@
-void dequote_bytea(char *string, STRLEN *retlen, int estring)
+static void _dequote_bytea_escape(char *string, STRLEN *retlen, int estring)
{
dTHX;
char *result;
@@ -482,6 +482,58 @@
return;
}
+static int _decode_hex_digit(char digit)
+{
+ dTHX;
+ if (digit >= '0' && digit <= '9')
+ return digit - '0';
+ if (digit >= 'a' && digit <= 'f')
+ return 10 + digit - 'a';
+ if (digit >= 'A' && digit <= 'F')
+ return 10 + digit - 'A';
+
+ return -1;
+}
+
+static void _dequote_bytea_hex(char *string, STRLEN *retlen, int estring)
+{
+ dTHX;
+ char *result;
+
+ (*retlen) = 0;
+
+ if (NULL == string)
+ return;
+
+ result = string;
+
+ while (*string != '\0') {
+ int digit1, digit2;
+ digit1 = _decode_hex_digit(*string);
+ digit2 = _decode_hex_digit(*(string+1));
+ if (digit1 >= 0 && digit2 >= 0) {
+ *result++ = 16 * digit1 + digit2;
+ (*retlen)++;
+ }
+ string += 2;
+ }
+ *result = '\0';
+ return;
+}
+
+void dequote_bytea(char *string, STRLEN *retlen, int estring)
+{
+ dTHX;
+
+ if (NULL == string)
+ return;
+
+ if ('\\' == *string && 'x' == *(string+1))
+ return _dequote_bytea_hex(string, retlen, estring);
+ else
+ return _dequote_bytea_escape(string, retlen, estring);
+}
+
/*
This one is not used in PG, but since we have a quote_sql_binary,
it might be nice to let people go the other way too. Say when talking
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/quote.h new/DBD-Pg-2.17.2/quote.h
--- old/DBD-Pg-2.17.1/quote.h 2009-05-26 07:56:22.000000000 +0200
+++ new/DBD-Pg-2.17.2/quote.h 2010-05-10 20:39:22.000000000 +0200
@@ -6,7 +6,7 @@
char * quote_bool(const char *string, STRLEN len, STRLEN *retlen, int estring);
char * quote_integer(const char *string, STRLEN len, STRLEN *retlen, int
estring);
char * quote_int(const char *string, STRLEN len, STRLEN *retlen, int estring);
-char * quote_float(const char *string, STRLEN len, STRLEN *retlen, int
estring);
+char * quote_float(char *string, STRLEN len, STRLEN *retlen, int estring);
char * quote_name(const char *string, STRLEN len, STRLEN *retlen, int estring);
char * quote_geom(const char *string, STRLEN len, STRLEN *retlen, int estring);
char * quote_path(const char *string, STRLEN len, STRLEN *retlen, int estring);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/01connect.t
new/DBD-Pg-2.17.2/t/01connect.t
--- old/DBD-Pg-2.17.1/t/01connect.t 2010-02-07 06:04:39.000000000 +0100
+++ new/DBD-Pg-2.17.2/t/01connect.t 2010-11-21 05:40:57.000000000 +0100
@@ -24,7 +24,7 @@
if (! defined $dbh or $connerror) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
-plan tests => 13;
+plan tests => 15;
pass ('Established a connection to the database');
@@ -86,6 +86,22 @@
is ($err, '', $t);
}
+ $t=q{Connect with forced uppercase 'DBI:' works};
+ my
($testdsn,$testuser,$helpconnect,$su,$uid,$testdir,$pg_ctl,$initdb,$error,$version)
+ = get_test_settings();
+ $testdsn =~ s/^dbi/DBI/i;
+ my $ldbh = DBI->connect($testdsn, $testuser, $ENV{DBI_PASS},
+ {RaiseError => 1, PrintError => 0, AutoCommit => 0});
+ ok (ref $ldbh, $t);
+ $ldbh->disconnect();
+
+ $t=q{Connect with mixed case 'DbI:' works};
+ $testdsn =~ s/^dbi/DbI/i;
+ $ldbh = DBI->connect($testdsn, $testuser, $ENV{DBI_PASS},
+ {RaiseError => 1, PrintError => 0, AutoCommit => 0});
+ ok (ref $ldbh, $t);
+ $ldbh->disconnect();
+
if ($ENV{DBI_DSN} =~ /$alias\s*=\s*\"/) {
skip ('DBI_DSN already contains quoted database, no need for
explicit test', 1);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/02attribs.t
new/DBD-Pg-2.17.2/t/02attribs.t
--- old/DBD-Pg-2.17.1/t/02attribs.t 2009-09-04 04:58:18.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/02attribs.t 2010-10-02 05:29:35.000000000 +0200
@@ -15,7 +15,7 @@
my ($helpconnect,$connerror,$dbh) = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 249;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/03dbmethod.t
new/DBD-Pg-2.17.2/t/03dbmethod.t
--- old/DBD-Pg-2.17.1/t/03dbmethod.t 2010-04-06 18:21:02.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/03dbmethod.t 2010-11-21 03:34:08.000000000 +0100
@@ -23,10 +23,10 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
-plan tests => 529;
+plan tests => 531;
isnt ($dbh, undef, 'Connect to database for database handle method testing');
@@ -610,11 +610,13 @@
is_deeply (\%missing, {}, $t);
## Check some of the returned fields:
-$result = $result->[0];
-is ($r->{TABLE_CAT}, undef, 'DB handle method "primary_key_info"
returns proper TABLE_CAT');
-is ($r->{TABLE_NAME}, 'dbd_pg_test', 'DB handle method "primary_key_info"
returns proper TABLE_NAME');
-is ($r->{COLUMN_NAME}, 'id', 'DB handle method "primary_key_info"
returns proper COLUMN_NAME');
-cmp_ok ($result->{KEY_SEQ}, '>=', 1, 'DB handle method "primary_key_info"
returns proper KEY_SEQ');
+$r = $result->[0];
+is ($r->{TABLE_CAT}, undef, 'DB handle method
"primary_key_info" returns proper TABLE_CAT');
+is ($r->{TABLE_NAME}, 'dbd_pg_test', 'DB handle method
"primary_key_info" returns proper TABLE_NAME');
+is ($r->{COLUMN_NAME}, 'id', 'DB handle method
"primary_key_info" returns proper COLUMN_NAME');
+is ($r->{PK_NAME}, 'dbd_pg_test_pkey', 'DB handle method
"primary_key_info" returns proper PK_NAME');
+is ($r->{DATA_TYPE}, 'int4', 'DB handle method
"primary_key_info" returns proper DATA_TYPE');
+is ($r->{KEY_SEQ}, 1, 'DB handle method
"primary_key_info" returns proper KEY_SEQ');
#
# Test of the "primary_key" database handle method
@@ -1400,8 +1402,6 @@
ok (!$result, $t);
$dbh->rollback();
-my $abctext = $pgversion >= 80500 ? 'x6162630a646566' : "abc\ndef";
-
SKIP: {
eval {
@@ -1420,7 +1420,7 @@
$t='DB handle method "pg_lo_import" inserts correct data';
$SQL = "SELECT data FROM pg_largeobject where loid = $handle";
$info = $dbh->selectall_arrayref($SQL)->[0][0];
- is_deeply ($info, $abctext, $t);
+ is_deeply ($info, "abc\ndef", $t);
$dbh->commit();
SKIP: {
@@ -1442,7 +1442,7 @@
$t='DB handle method "pg_lo_import_with_oid" inserts correct
data';
$SQL = "SELECT data FROM pg_largeobject where loid = $thandle";
$info = $dbh->selectall_arrayref($SQL)->[0][0];
- is_deeply ($info, $abctext, $t);
+ is_deeply ($info, "abc\ndef", $t);
$t='DB handle method "pg_lo_import_with_oid" fails when given
already used number';
eval {
@@ -1556,7 +1556,7 @@
$sth = $dbh->prepare($SQL);
$sth->execute($handle);
$info = $sth->fetchall_arrayref()->[0][0];
- is_deeply ($info, $abctext, $t);
+ is_deeply ($info, "abc\ndef", $t);
$t='DB handle method "pg_lo_import" works (AutoCommit on, begin_work
called, no command)';
$dbh->begin_work();
@@ -1564,7 +1564,7 @@
ok ($handle, $t);
$sth->execute($handle);
$info = $sth->fetchall_arrayref()->[0][0];
- is_deeply ($info, $abctext, $t);
+ is_deeply ($info, "abc\ndef", $t);
$dbh->rollback();
$t='DB handle method "pg_lo_import" works (AutoCommit on, begin_work
called, no command, rollback)';
@@ -1583,7 +1583,7 @@
ok ($handle, $t);
$sth->execute($handle);
$info = $sth->fetchall_arrayref()->[0][0];
- is_deeply ($info, $abctext, $t);
+ is_deeply ($info, "abc\ndef", $t);
$dbh->rollback();
$t='DB handle method "pg_lo_import" works (AutoCommit on, begin_work
called, second command, rollback)';
@@ -1603,7 +1603,7 @@
ok ($handle, $t);
$sth->execute($handle);
$info = $sth->fetchall_arrayref()->[0][0];
- is_deeply ($info, $abctext, $t);
+ is_deeply ($info, "abc\ndef", $t);
$t='DB handle method "pg_lo_import" works (AutoCommit not on, second
command)';
$dbh->rollback();
@@ -1612,7 +1612,7 @@
ok ($handle, $t);
$sth->execute($handle);
$info = $sth->fetchall_arrayref()->[0][0];
- is_deeply ($info, $abctext, $t);
+ is_deeply ($info, "abc\ndef", $t);
unlink $filename;
$dbh->{AutoCommit} = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/03smethod.t
new/DBD-Pg-2.17.2/t/03smethod.t
--- old/DBD-Pg-2.17.1/t/03smethod.t 2009-08-04 05:45:18.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/03smethod.t 2010-10-02 05:31:31.000000000 +0200
@@ -17,7 +17,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 96;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/04misc.t new/DBD-Pg-2.17.2/t/04misc.t
--- old/DBD-Pg-2.17.1/t/04misc.t 2009-05-26 07:56:22.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/04misc.t 2010-11-21 05:55:58.000000000 +0100
@@ -15,10 +15,10 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
-plan tests => 54;
+plan tests => 56;
isnt ($dbh, undef, 'Connect to database for miscellaneous tests');
@@ -284,13 +284,36 @@
$t='The "data_sources" method returns undef when fed a bogus second argument';
@result = DBI->data_sources('Pg','foobar');
-is_deeply (@result, undef, $t);
+is (scalar @result, 0, $t);
$t='The "data_sources" method returns information when fed a valid port as the
second arg';
my $port = $dbh->{pg_port};
@result = DBI->data_sources('Pg',"port=$port");
isnt ($result[0], undef, $t);
+SKIP: {
+
+ $t=q{The "data_sources" method returns information when 'dbi:Pg' is
uppercased};
+
+ if (! exists $ENV{DBI_DSN} or $ENV{DBI_DSN} !~ /pg/i) {
+ skip 'Cannot test data_sources() DBI_DSN munging unless DBI_DSN
is set', 2;
+ }
+
+ my $orig = $ENV{DBI_DSN};
+ $ENV{DBI_DSN} =~ s/DBI:PG/DBI:PG/i;
+ @result = DBI->data_sources('Pg');
+ like ((join '' => @result), qr{template0}, $t);
+
+ $t=q{The "data_sources" method returns information when 'DBI:' is mixed
case};
+
+ $ENV{DBI_DSN} =~ s/DBI:PG/dBi:pg/i;
+ @result = DBI->data_sources('Pg');
+ like ((join '' => @result), qr{template0}, $t);
+
+ $ENV{DBI_DSN} = $orig;
+
+}
+
#
# Test the use of $DBDPG_DEFAULT
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/06bytea.t
new/DBD-Pg-2.17.2/t/06bytea.t
--- old/DBD-Pg-2.17.1/t/06bytea.t 2010-04-05 21:44:17.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/06bytea.t 2010-11-21 03:34:08.000000000 +0100
@@ -14,10 +14,10 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
-plan tests => 11;
+plan tests => 16;
isnt ($dbh, undef, 'Connect to database for bytea testing');
@@ -26,15 +26,12 @@
$dbh->do('SET escape_string_warning = false');
}
-if ($pgversion >= 90000) {
- $dbh->do(q{SET bytea_output = 'escape'});
-}
-
my ($sth, $t);
$sth = $dbh->prepare(q{INSERT INTO dbd_pg_test (id,bytetest) VALUES (?,?)});
$t='bytea insert test with string containing null and backslashes';
+$sth->bind_param(1, undef, { pg_type => PG_INT4 });
$sth->bind_param(2, undef, { pg_type => PG_BYTEA });
ok ($sth->execute(400, 'aa\\bb\\cc\\\0dd\\'), $t);
@@ -52,31 +49,48 @@
$sth->{pg_server_prepare} = 1;
ok ($sth->execute(404, $binary_out), $t);
-$t='Received correct text from BYTEA column with backslashes';
-$sth = $dbh->prepare(q{SELECT bytetest FROM dbd_pg_test WHERE id=?});
-$sth->execute(400);
-my $byte = $sth->fetchall_arrayref()->[0][0];
-is ($byte, 'aa\bb\cc\\\0dd\\', $t);
-
-$t='Received correct text from BYTEA column with quote';
-$sth->execute(402);
-$byte = $sth->fetchall_arrayref()->[0][0];
-is ($byte, '\'', $t);
-
-$t='Ensure proper handling of high bit characters';
-$sth->execute(403);
-($binary_in) = $sth->fetchrow_array();
-ok ($binary_in eq $binary_out, $t);
-$sth->execute(404);
-($binary_in) = $sth->fetchrow_array();
-ok ($binary_in eq $binary_out, $t);
-
-$t='quote properly handles bytea strings';
-my $string = "abc\123\\def\0ghi";
-my $result = $dbh->quote($string, { pg_type => PG_BYTEA });
-my $E = $pgversion >= 80100 ? q{E} : q{};
-my $expected = qq{${E}'abc\123\\\\\\\\def\\\\000ghi'};
-is ($result, $expected, $t);
+my @output;
+if ($pgversion >= 90000) {
+ @output = qw(hex escape);
+}
+else {
+ @output = (undef);
+ SKIP: { skip 'No BYTEA output format setting before 9.0', 5 }
+}
+
+for my $output (@output) {
+ $dbh->do(qq{SET bytea_output = '$output'}) if $output;
+
+ $t='Received correct text from BYTEA column with backslashes';
+ $t.=" ($output output)" if $output;
+ $sth = $dbh->prepare(q{SELECT bytetest FROM dbd_pg_test WHERE id=?});
+ $sth->execute(400);
+ my $byte = $sth->fetchall_arrayref()->[0][0];
+ is ($byte, 'aa\bb\cc\\\0dd\\', $t);
+
+ $t='Received correct text from BYTEA column with quote';
+ $t.=" ($output output)" if $output;
+ $sth->execute(402);
+ $byte = $sth->fetchall_arrayref()->[0][0];
+ is ($byte, '\'', $t);
+
+ $t='Ensure proper handling of high bit characters';
+ $t.=" ($output output)" if $output;
+ $sth->execute(403);
+ ($binary_in) = $sth->fetchrow_array();
+ ok ($binary_in eq $binary_out, $t);
+ $sth->execute(404);
+ ($binary_in) = $sth->fetchrow_array();
+ ok ($binary_in eq $binary_out, $t);
+
+ $t='quote properly handles bytea strings';
+ $t.=" ($output output)" if $output;
+ my $string = "abc\123\\def\0ghi";
+ my $result = $dbh->quote($string, { pg_type => PG_BYTEA });
+ my $E = $pgversion >= 80100 ? q{E} : q{};
+ my $expected = qq{${E}'abc\123\\\\\\\\def\\\\000ghi'};
+ is ($result, $expected, $t);
+}
$sth->finish();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/07copy.t new/DBD-Pg-2.17.2/t/07copy.t
--- old/DBD-Pg-2.17.1/t/07copy.t 2009-07-23 04:03:16.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/07copy.t 2010-10-02 05:31:00.000000000 +0200
@@ -13,7 +13,7 @@
my $dbh = connect_database();
-if (defined $dbh) {
+if ($dbh) {
plan tests => 55;
}
else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/08async.t
new/DBD-Pg-2.17.2/t/08async.t
--- old/DBD-Pg-2.17.1/t/08async.t 2009-05-26 07:56:22.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/08async.t 2010-10-02 05:31:13.000000000 +0200
@@ -14,7 +14,7 @@
my $dbh = connect_database();
-if (!defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/09arrays.t
new/DBD-Pg-2.17.2/t/09arrays.t
--- old/DBD-Pg-2.17.1/t/09arrays.t 2009-09-10 20:15:44.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/09arrays.t 2010-10-02 05:30:49.000000000 +0200
@@ -15,7 +15,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 257;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/12placeholders.t
new/DBD-Pg-2.17.2/t/12placeholders.t
--- old/DBD-Pg-2.17.1/t/12placeholders.t 2010-04-06 18:01:34.000000000
+0200
+++ new/DBD-Pg-2.17.2/t/12placeholders.t 2010-10-02 05:58:45.000000000
+0200
@@ -14,7 +14,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 235;
@@ -510,6 +510,7 @@
skip 'Cannot run some quote tests on very old versions of Postgres', 14
if $pgversion < 80000;
$t='Prepare works with placeholders after double slashes';
+## TODO: Fix with a perms check per bug 61534
eval {
$dbh->do(q{CREATE OPERATOR // ( PROCEDURE=bit, LEFTARG=int,
RIGHTARG=int )});
$sth = $dbh->prepare(q{SELECT ? // ?});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/20savepoints.t
new/DBD-Pg-2.17.2/t/20savepoints.t
--- old/DBD-Pg-2.17.1/t/20savepoints.t 2009-05-26 07:56:22.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/20savepoints.t 2010-10-02 05:30:39.000000000 +0200
@@ -13,7 +13,7 @@
my $dbh = connect_database();
-if (!defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 3;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/99cleanup.t
new/DBD-Pg-2.17.2/t/99cleanup.t
--- old/DBD-Pg-2.17.1/t/99cleanup.t 2009-08-04 18:46:52.000000000 +0200
+++ new/DBD-Pg-2.17.2/t/99cleanup.t 2010-10-02 05:30:28.000000000 +0200
@@ -15,7 +15,7 @@
my $dbh = connect_database({nosetup => 1, nocreate => 1, norestart => 1});
SKIP: {
- if (! defined $dbh) {
+ if (! $dbh) {
skip ('Connection to database failed, cannot cleanup', 1);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DBD-Pg-2.17.1/t/dbdpg_test_setup.pl
new/DBD-Pg-2.17.2/t/dbdpg_test_setup.pl
--- old/DBD-Pg-2.17.1/t/dbdpg_test_setup.pl 2010-04-06 19:37:28.000000000
+0200
+++ new/DBD-Pg-2.17.2/t/dbdpg_test_setup.pl 2010-11-21 05:31:23.000000000
+0100
@@ -46,7 +46,7 @@
sub connect_database {
## Connect to the database (unless 'dbh' is passed in)
- ## Setup all the tables (unless 'nosetup' is passed in)
+ ## Setup all the tables (unless 'nocreate' is passed in)
## Returns three values:
## 1. helpconnect for use by 01connect.t
## 2. Any error generated
@@ -88,7 +88,7 @@
}
goto GOTDBH if eval {
- $dbh = DBI->connect($testdsn, $testuser, '',
+ $dbh = DBI->connect($testdsn, $testuser, $ENV{DBI_PASS},
{RaiseError =>
1, PrintError => 0, AutoCommit => 1});
1;
};
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |