r25545 - in /trunk/libdbd-pg-perl: Changes META.yml Makefile.PL Pg.pm README SIGNATURE TODO dbdimp.c debian/changelog lib/Bundle/DBD/Pg.pm quote.c t/02attribs.t t/03dbmethod.t t/09arrays.t t/99_spellcheck.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Mon Sep 22 19:57:40 UTC 2008


Author: dmn
Date: Mon Sep 22 19:57:37 2008
New Revision: 25545

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25545
Log:
New upstream release

Modified:
    trunk/libdbd-pg-perl/Changes
    trunk/libdbd-pg-perl/META.yml
    trunk/libdbd-pg-perl/Makefile.PL
    trunk/libdbd-pg-perl/Pg.pm
    trunk/libdbd-pg-perl/README
    trunk/libdbd-pg-perl/SIGNATURE
    trunk/libdbd-pg-perl/TODO
    trunk/libdbd-pg-perl/dbdimp.c
    trunk/libdbd-pg-perl/debian/changelog
    trunk/libdbd-pg-perl/lib/Bundle/DBD/Pg.pm
    trunk/libdbd-pg-perl/quote.c
    trunk/libdbd-pg-perl/t/02attribs.t
    trunk/libdbd-pg-perl/t/03dbmethod.t
    trunk/libdbd-pg-perl/t/09arrays.t
    trunk/libdbd-pg-perl/t/99_spellcheck.t

Modified: trunk/libdbd-pg-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/Changes?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/Changes (original)
+++ trunk/libdbd-pg-perl/Changes Mon Sep 22 19:57:37 2008
@@ -1,10 +1,26 @@
 ('GSM' is Greg Sabino Mullane, greg at turnstep.com)
 
-2.10.3 Released August 31, 2008
+2.10.6 Released September 19, 2008
+
+	- Correctly quote all bytea characters. (CPAN bug #39390) [Rod Taylor]
+	- Prevent core dump when checking $dbh->{standard_conforming_strings}
+		on older servers. [GSM]
+	- Skip unicode tests if server is set to 'LATIN1' [GSM]
+
+2.10.5 Released September 16, 2008 (subversion r11800)
+
+	- Fix SIGNATURE file
+
+2.10.4 Released September 16, 2008 (subversion r11797)
+
+	- Force use of math library when compiling. Per report 
+		of AIX problems by Rainer Tammer.
+
+2.10.3 Released August 31, 2008 (subversion r11706)
 
 	- Previous version had wrong SIGNATURE file
 
-2.10.2 Released August 31, 2008
+2.10.2 Released August 31, 2008 (subversion r11704)
 
 	- Fix minor problem in t/99_yaml.t
 

Modified: trunk/libdbd-pg-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/META.yml?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/META.yml (original)
+++ trunk/libdbd-pg-perl/META.yml Mon Sep 22 19:57:37 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.1
 name                        : DBD-Pg
-version                     : 2.10.3
+version                     : 2.10.6
 abstract                    : DBI PostgreSQL interface
 author:              
   - Greg Sabino Mullane <greg at turnstep.com>
@@ -38,10 +38,10 @@
 provides:
   DBD::Pg:
     file                    : Pg.pm
-    version                 : 2.10.3
+    version                 : 2.10.6
   Bundle::DBD::Pg:
     file                    : lib/Bundle/DBD/Pg.pm
-    version                 : 2.10.3
+    version                 : 2.10.6
 
 keywords:
   - Postgres

Modified: trunk/libdbd-pg-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/Makefile.PL?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/Makefile.PL (original)
+++ trunk/libdbd-pg-perl/Makefile.PL Mon Sep 22 19:57:37 2008
@@ -1,4 +1,4 @@
-# $Id: Makefile.PL 11705 2008-09-01 01:42:41Z turnstep $
+# $Id: Makefile.PL 11803 2008-09-17 22:02:51Z turnstep $
 
 use ExtUtils::MakeMaker;
 use Config;
@@ -7,7 +7,7 @@
 use 5.006001;
 
 ## No version.pm for this one, as the prereqs are not loaded yet.
-my $VERSION = '2.10.3';
+my $VERSION = '2.10.6';
 
 my $lib;
 BEGIN {
@@ -184,7 +184,7 @@
 	 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"],
+	 LIBS           => ["-L$POSTGRES_LIB -lpq -lm"],
 	 AUTHOR         => 'Greg Sabino Mullane',
 	 ABSTRACT       => 'PostgreSQL database driver for the DBI module',
 	 PREREQ_PM      => {

Modified: trunk/libdbd-pg-perl/Pg.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/Pg.pm?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/Pg.pm (original)
+++ trunk/libdbd-pg-perl/Pg.pm Mon Sep 22 19:57:37 2008
@@ -1,5 +1,5 @@
 #  -*-cperl-*-
-#  $Id: Pg.pm 11705 2008-09-01 01:42:41Z turnstep $
+#  $Id: Pg.pm 11806 2008-09-17 22:22:54Z turnstep $
 #
 #  Copyright (c) 2002-2008 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.10.3');
+	use version; our $VERSION = qv('2.10.6');
 
 	use DBI ();
 	use DynaLoader ();
@@ -1703,7 +1703,7 @@
 
 =head1 VERSION
 
-This documents version 2.10.3 of the DBD::Pg module
+This documents version 2.10.6 of the DBD::Pg module
 
 =head1 DESCRIPTION
 
@@ -2243,15 +2243,15 @@
 Returns C<dr> for a driver handle, C<db> for a database handle, and C<st> for a statement handle. 
 Should be rarely needed.
 
-=head3 B<LongReadLen> (integer, inherited)
+=head3 B<LongReadLen>
 
 Not used by DBD::Pg
 
-=head3 B<LongTruncOk> (boolean, inherited)
+=head3 B<LongTruncOk>
 
 Not used by DBD::Pg
 
-=head3 B<CompatMode> (boolean, inherited)
+=head3 B<CompatMode>
 
 Not used by DBD::Pg
 
@@ -2420,7 +2420,7 @@
 the L</pg_direct> attribute to your prepare call. This is not recommended,
 but is added just in case you need it.
 
-=head3 B<Placeholders>
+=head4 B<Placeholders>
 
 There are three types of placeholders that can be used in DBD::Pg. The first is
 the "question mark" type, in which each placeholder is represented by a single
@@ -2622,6 +2622,47 @@
 If the script exits before disconnect is called (or, more precisely, if the database handle is no longer 
 referenced by anything), then the database handle's DESTROY method will call the rollback() and disconnect() 
 methods automatically. It is best to explicitly disconnect rather than rely on this behavior.
+
+=head3 B<quote>
+
+  $rv = $dbh->quote($value, $data_type);
+
+This module implements its own C<quote> method. For simple string types, both backslashes 
+and single quotes are doubled. You may also quote arrayrefs and receive a string 
+suitable for passing into Postgres array columns.
+
+If the value contains backslashes, and the server is version 8.1 or higher, 
+then the escaped string syntax will be used (which places a capital E before 
+the first single quote). This syntax is always used when quoting bytea values 
+on servers 8.1 and higher.
+
+The C<data_type> argument is optional and should be one of the type constants 
+exported by DBD::Pg (such as PG_BYTEA). In addition to string, bytea, char, bool, 
+and other standard types, the following geometric types are supported: point, line, 
+lseg, box, path, polygon, and circle (PG_POINT, PG_LINE, PG_LSEG, PG_BOX, 
+PG_POLYGON, and PG_CIRCLE respectively).
+
+B<NOTE:> The undocumented (and invalid) support for the C<SQL_BINARY> data
+type is officially deprecated. Use C<PG_BYTEA> with C<bind_param()> instead:
+
+  $rv = $sth->bind_param($param_num, $bind_value,
+                         { pg_type => PG_BYTEA });
+
+=head3 B<quote_identifier>
+
+  $string = $dbh->quote_identifier( $name );
+  $string = $dbh->quote_identifier( undef, $schema, $table);
+
+Returns a quoted version of the supplied string, which is commonly a schema, 
+table, or column name. The three argument form will return the schema and 
+the table together, separated by a dot. Examples:
+
+  print $dbh->quote_identifier('grapefruit'); ## Prints: "grapefruit"
+
+  print $dbh->quote_identifier('juicy fruit'); ## Prints: "juicy fruit"
+
+  print $dbh->quote_identifier(undef, 'public', 'pg_proc');
+  ## Prints: "public"."pg_proc"
 
 =head3 B<pg_notifies>
 
@@ -2911,47 +2952,6 @@
 Returns a list of hash references holding information about one or more variants of $data_type. 
 See the DBI documentation for more details.
 
-=head3 B<quote>
-
-  $rv = $dbh->quote($value, $data_type);
-
-This module implements its own C<quote> method. For simple string types, both backslashes 
-and single quotes are doubled. You may also quote arrayrefs and receive a string 
-suitable for passing into Postgres array columns.
-
-If the value contains backslashes, and the server is version 8.1 or higher, 
-then the escaped string syntax will be used (which places a capital E before 
-the first single quote). This syntax is always used when quoting bytea values 
-on servers 8.1 and higher.
-
-The C<data_type> argument is optional and should be one of the type constants 
-exported by DBD::Pg (such as PG_BYTEA). In addition to string, bytea, char, bool, 
-and other standard types, the following geometric types are supported: point, line, 
-lseg, box, path, polygon, and circle (PG_POINT, PG_LINE, PG_LSEG, PG_BOX, 
-PG_POLYGON, and PG_CIRCLE respectively).
-
-B<NOTE:> The undocumented (and invalid) support for the C<SQL_BINARY> data
-type is officially deprecated. Use C<PG_BYTEA> with C<bind_param()> instead:
-
-  $rv = $sth->bind_param($param_num, $bind_value,
-                         { pg_type => PG_BYTEA });
-
-=head3 B<quote_identifier>
-
-  $string = $dbh->quote_identifier( $name );
-  $string = $dbh->quote_identifier( undef, $schema, $table);
-
-Returns a quoted version of the supplied string, which is commonly a schema, 
-table, or column name. The three argument form will return the schema and 
-the table together, separated by a dot. Examples:
-
-  print $dbh->quote_identifier('grapefruit'); ## Prints: "grapefruit"
-
-  print $dbh->quote_identifier('juicy fruit'); ## Prints: "juicy fruit"
-
-  print $dbh->quote_identifier(undef, 'public', 'pg_proc');
-  ## Prints: "public"."pg_proc"
-
 =head3 B<pg_server_trace>
 
   $dbh->pg_server_trace($filehandle);
@@ -3149,7 +3149,7 @@
 DBD::Pg specific attribute. Default is off. If true, then the L</prepare> method will 
 immediately prepare commands, rather than waiting until the first execute.
 
-=head3 B<pg_expand_array> (boolean, read-only)
+=head3 B<pg_expand_array> (boolean)
 
 DBD::Pg specific attribute. Defaults to false. If false, arrays returned from the server will 
 not be changed into a Perl arrayref, but remain as a string.
@@ -3175,7 +3175,7 @@
 
 Constant to be used for the mode in L</lo_creat> and L</lo_open>.
 
-=head3 B<Driver> (handle)
+=head3 B<Driver> (handle, read-only)
 
 Holds the handle of the parent driver. The only recommended use for this is to find the name 
 of the driver using:
@@ -3188,9 +3188,9 @@
 If DBD::Pg is unable to figure out the version, it will return a "0". Otherwise,
 a "3" is returned.
 
-=head3 B<RowCacheSize> (integer)
-
-Not used for DBD::Pg
+=head3 B<RowCacheSize>
+
+Not used by DBD::Pg
 
 =head1 DBI STATEMENT HANDLE OBJECTS
 
@@ -3703,11 +3703,11 @@
 
 Not used by DBD::Pg
 
-=head3 B<RowCache> (integer, read-only)
+=head3 B<RowCache>
 
 Not used by DBD::Pg
 
-=head3 B<CursorName> (string, read-only)
+=head3 B<CursorName>
 
 Not used by DBD::Pg. See the note about L</Cursors> elsewhere in this document.
 

Modified: trunk/libdbd-pg-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/README?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/README (original)
+++ trunk/libdbd-pg-perl/README Mon Sep 22 19:57:37 2008
@@ -1,12 +1,12 @@
 
 DBD::Pg  --  the DBI PostgreSQL interface for Perl
 
-# $Id: README 11705 2008-09-01 01:42:41Z turnstep $
+# $Id: README 11803 2008-09-17 22:02:51Z turnstep $
 
 DESCRIPTION:
 ------------
 
-This is version 2.10.3 of DBD::Pg, the Perl interface to Postgres using DBI. 
+This is version 2.10.6 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/

Modified: trunk/libdbd-pg-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/SIGNATURE?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/SIGNATURE (original)
+++ trunk/libdbd-pg-perl/SIGNATURE Mon Sep 22 19:57:37 2008
@@ -15,41 +15,41 @@
 Hash: RIPEMD160
 
 SHA1 14d7a3c7a0b0497e4ab463b67850bd5e1f70409d .perlcriticrc
-SHA1 df34889abf6ccc4a1da6f6de86768e0d76977b66 Changes
+SHA1 a83dc346eeb9fdcdadc901061c651d32abc88d75 Changes
 SHA1 4d91c71e5dbb19ece1505ab75c36d00a744bb076 MANIFEST
 SHA1 22055b195f5cf15d7909e8a08468e617f46154e7 MANIFEST.SKIP
-SHA1 d1041812fe1446c6453e9fb6e91e6954f314a61c META.yml
-SHA1 29f8f7350dfeec70e569cb616863de5044e877cf Makefile.PL
+SHA1 d95d5380fd3d79e11987b82064c817770c9b3aa6 META.yml
+SHA1 56f3ade7a370cc8a7def08c454b6b77743df26de Makefile.PL
 SHA1 c51356c52c139265e20a2ad33bc8d3ee04f6ff48 Pg.h
-SHA1 1e5e4acd4bb754ae4b9c36f4638a98fb268bc7c8 Pg.pm
+SHA1 d9863b63a025c1554d2e1d7335260e3f9a3fad5c Pg.pm
 SHA1 caf6c843024b2853bc2460c60f9c667f9150cbd4 Pg.xs
-SHA1 b0bbb2f7211ec4a5e9e638994819ae6e06be7a27 README
+SHA1 356be150aff2608f6b87505eed03b37b984ca541 README
 SHA1 c6d2633bdb72186bfb2887d6a1efab3a06f44cbd README.dev
 SHA1 968d5fad61bce160b31a9cb1a21dd240b9df930f README.win32
-SHA1 df2b7dc8885b93d476b8f553ad1ee356734585bb TODO
-SHA1 9f62d36a36b23819316112e853f142bd8bfefafc dbdimp.c
+SHA1 cb3078ec98906fc6381ca0af9e146e2d8b4176c6 TODO
+SHA1 de56b7328d402a3ba32431b97410d401aedc7f45 dbdimp.c
 SHA1 e079dca9f560b265daba52e7daee42e1a17184bb dbdimp.h
 SHA1 6c33bcf138e577722283bef02fceb8cbce4d100d dbivport.h
-SHA1 2bbc80c96d070b95cb12110057356ab185652aec lib/Bundle/DBD/Pg.pm
-SHA1 76a2c65c065a93775ceadf933a5d38bb25c8afa4 quote.c
+SHA1 6a3c7c46fc7db7e76c7333026bf714e1458137fb lib/Bundle/DBD/Pg.pm
+SHA1 dbe8b0bd24538a61d4c617848e7fca27fd4ea3eb quote.c
 SHA1 0a1fdd0406c5c367a9aba366d1d35cfa8d5272ae quote.h
 SHA1 93aa7e8cae0a361d1e6163dea0281ebff41f3c5f t/00-signature.t
 SHA1 073baf503a601ceeb49516d61bd275f0c1e51563 t/00basic.t
 SHA1 e5c88f4796bed486507104d3a751315995c77b94 t/01connect.t
 SHA1 ec842e6aaf11d6a55809318d69bd11ce8245092f t/01constants.t
-SHA1 806b8b7dfac746f8d4624a61cd0de387baa206ee t/02attribs.t
-SHA1 0d0a07674d2c493601a6807d22c2c8f2bdbbcd91 t/03dbmethod.t
+SHA1 73c4d8f20e828885828505f8266629af4f2e8ae9 t/02attribs.t
+SHA1 790f36471738f6b701e86654f8cd0ffafce03f0b t/03dbmethod.t
 SHA1 7ce47f4163e23b3f3df589487707257f5158001a t/03smethod.t
 SHA1 910d6c2234d77a74a49cf189b6c799e13bf75280 t/04misc.t
 SHA1 ee7ecab04b202d5cd8816fbb8c2703971161dd53 t/06bytea.t
 SHA1 2aac29d06766d0edbf0848c433c2ff837908e6ea t/07copy.t
 SHA1 1413c886eaf1714db1cf8abfb989dabfd86dee87 t/08async.t
-SHA1 acfbfcdbbf4f285b068da11c1031d0afc1c365b5 t/09arrays.t
+SHA1 5027751944bdca8f0fe63c20c790c4c3beccf433 t/09arrays.t
 SHA1 ee401c485a5c6f36844268eac0e95485359790bf t/12placeholders.t
 SHA1 85b5df8ef0c78b1d2d0018d874c62af7ef01a28f t/20savepoints.t
 SHA1 3bfb78b128724d3badf19ec4db8c1674543c557e t/99_perlcritic.t
 SHA1 9f94e06ec6b6a27512f1f4c638635e4095ae6be7 t/99_pod.t
-SHA1 8910669c9217011efc9a91b4cd5da0f6e7537cc2 t/99_spellcheck.t
+SHA1 29ee4d1ebb593b2148e2b50f75e55c7c4b8ee376 t/99_spellcheck.t
 SHA1 ace40437561196dc6a08b5e725de35aed0e9902c t/99_yaml.t
 SHA1 60031c2db489d77291078ab6a418723e1a35f137 t/99cleanup.t
 SHA1 1ecceecf54ab48affeae320e0cd8dfbcacfd51d5 t/dbdpg_test_setup.pl
@@ -65,7 +65,7 @@
 SHA1 f07cd5ecaeb854c81ceb9206364979cf607e6546 win32.mak
 -----BEGIN PGP SIGNATURE-----
 
-iEYEAREDAAYFAki7SOsACgkQvJuQZxSWSshQMQCgglBy/lNirUzKyS4Hq58wQhiD
-6WsAoKZ+MyySWAmpBj421vTNjv5vU86/
-=kgk+
+iEYEAREDAAYFAkjTqRQACgkQvJuQZxSWSshUHQCgrdRP5fxrnfWKeGBUpLP084l0
+r+YAni9pa97s07shGU5LGSjiTUmOeZnO
+=lkDO
 -----END PGP SIGNATURE-----

Modified: trunk/libdbd-pg-perl/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/TODO?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/TODO (original)
+++ trunk/libdbd-pg-perl/TODO Mon Sep 22 19:57:37 2008
@@ -17,4 +17,6 @@
 - Handle and/or better tests for different encoding, especially those not 
    supported as a server encoding (e.g. BIG5)
 - Support passing hashrefs in and out for custom types.
-- Support a flag for behind-the-scenes CURSOR to emulate partial fetches.
+- Support a flag for behind-the-scenes CURSOR to emulate partial fetches.
+- Handle unicode conversion better and perhaps eliminate the need for 
+  the pg_enable_utf8 attribute.

Modified: trunk/libdbd-pg-perl/dbdimp.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/dbdimp.c?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/dbdimp.c (original)
+++ trunk/libdbd-pg-perl/dbdimp.c Mon Sep 22 19:57:37 2008
@@ -1,6 +1,6 @@
 /*
 
-  $Id: dbdimp.c 11673 2008-08-23 22:11:15Z turnstep $
+  $Id: dbdimp.c 11818 2008-09-18 19:10:13Z turnstep $
 
   Copyright (c) 2002-2008 Greg Sabino Mullane and others: see the Changes file
   Portions Copyright (c) 2002 Jeffrey W. Baker
@@ -623,7 +623,7 @@
 	SV *   retsv = Nullsv;
 	
 	if (TSTART) TRC(DBILOGFP, "%sBegin dbd_db_FETCH (key: %s)\n", THEADER, dbh ? key : key);
-	
+
 	switch (kl) {
 
 	case 5: /* pg_db */
@@ -743,8 +743,9 @@
 	case 30: /* pg_standard_conforming_strings */
 
 		if (strEQ("pg_standard_conforming_strings", key)) {
-			TRACE_PQPARAMETERSTATUS;
-			retsv = newSVpv(PQparameterStatus(imp_dbh->conn,"standard_conforming_strings"),0);
+			if (NULL != PQparameterStatus(imp_dbh->conn, "standard_conforming_strings")) {
+				retsv = newSVpv(PQparameterStatus(imp_dbh->conn,"standard_conforming_strings"),0);
+			}
 		}
 		break;
 

Modified: trunk/libdbd-pg-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/debian/changelog?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/debian/changelog (original)
+++ trunk/libdbd-pg-perl/debian/changelog Mon Sep 22 19:57:37 2008
@@ -1,3 +1,9 @@
+libdbd-pg-perl (2.10.6-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Damyan Ivanov <dmn at debian.org>  Mon, 22 Sep 2008 22:54:37 +0300
+
 libdbd-pg-perl (2.10.3-1) unstable; urgency=low
 
   * New upstream release.

Modified: trunk/libdbd-pg-perl/lib/Bundle/DBD/Pg.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/lib/Bundle/DBD/Pg.pm?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/lib/Bundle/DBD/Pg.pm (original)
+++ trunk/libdbd-pg-perl/lib/Bundle/DBD/Pg.pm Mon Sep 22 19:57:37 2008
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-$VERSION = '2.10.3';
+$VERSION = '2.10.6';
 
 1;
 

Modified: trunk/libdbd-pg-perl/quote.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/quote.c?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/quote.c (original)
+++ trunk/libdbd-pg-perl/quote.c Mon Sep 22 19:57:37 2008
@@ -1,6 +1,6 @@
 /*
 
-   $Id: quote.c 11220 2008-05-09 02:14:39Z turnstep $
+   $Id: quote.c 11819 2008-09-18 19:10:52Z turnstep $
 
    Copyright (c) 2003-2008 Greg Sabino Mullane and others: see the Changes file
 
@@ -205,7 +205,7 @@
 			*result++ = '\\';
 		}
 		else if (*string < 0x20 || *string > 0x7e) {
-			(void) snprintf((char *)result, 6, "\\\\%03o", *string++);
+			(void) snprintf((char *)result, 6, "\\\\%03o", (unsigned char)*string++);
 			result += 5;
 		}
 		else {

Modified: trunk/libdbd-pg-perl/t/02attribs.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/t/02attribs.t?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/t/02attribs.t (original)
+++ trunk/libdbd-pg-perl/t/02attribs.t Mon Sep 22 19:57:37 2008
@@ -411,6 +411,11 @@
 SKIP: {
 	eval { require Encode; };
 	skip ('Encode module is needed for unicode tests', 5) if $@;
+
+	my $server_encoding = $dbh->selectall_arrayref('SHOW server_encoding')->[0][0];
+	skip ('Cannot test unicode with a LATIN1 database', 5)
+		if $server_encoding eq 'LATIN1';
+
 	my $SQL = 'SELECT id, pname FROM dbd_pg_test WHERE id = ?';
 	my $sth = $dbh->prepare($SQL);
 	$sth->execute(1);

Modified: trunk/libdbd-pg-perl/t/03dbmethod.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/t/03dbmethod.t?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/t/03dbmethod.t (original)
+++ trunk/libdbd-pg-perl/t/03dbmethod.t Mon Sep 22 19:57:37 2008
@@ -26,7 +26,7 @@
 if (! defined $dbh) {
 	plan skip_all => 'Connection to database failed, cannot continue testing';
 }
-plan tests => 224;
+plan tests => 479;
 
 isnt ($dbh, undef, 'Connect to database for database handle method testing');
 
@@ -632,6 +632,8 @@
 #
 # Test of the "statistics_info" database handle method
 #
+
+SKIP: {
 
 $dbh->{private_dbdpg}{version} >= 80000
 	or skip ('Server must be version 8.0 or higher to test database handle method "statistics_info"', 10);
@@ -745,7 +747,7 @@
 $dbh->do("DROP TABLE $table2");
 $dbh->do("DROP TABLE $table1");
 
-## end of statistics_info tests
+} ## end of statistics_info tests
 
 
 #
@@ -1115,6 +1117,31 @@
 $t='DB handle method "quote" works with a supplied data type argument';
 is ($dbh->quote(1, 4), 1, $t);
 
+## Test bytea quoting
+my $scs = $dbh->{pg_standard_conforming_strings};
+for my $byteval (1 .. 255) {
+	my $byte = chr($byteval);
+	$result = $dbh->quote($byte, { pg_type => PG_BYTEA });
+	if ($byteval < 32 or $byteval >= 127) {
+		$expected = $scs
+			? sprintf q{E'\\\\%03o'}, $byteval
+				: sprintf q{'\\\\%03o'}, $byteval;
+	}
+	else {
+		$expected = $scs
+			? sprintf q{E'%s'}, $byte
+				: sprintf q{'%s'}, $byte;
+	}
+	if ($byte eq '\\') {
+		$expected =~ s{\\}{\\\\\\\\};
+	}
+	elsif ($byte eq q{'}) {
+		$expected = $scs ? q{E''''} : q{''''};
+	}
+	$t = qq{Byte value $byteval quotes to $expected};
+	is ($result, $expected, $t);
+}
+
 ## Various backslash tests
 $t='DB handle method "quote" works properly with backslashes';
 my $E = $pgversion >= 80100 ? q{E} : q{};

Modified: trunk/libdbd-pg-perl/t/09arrays.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/t/09arrays.t?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/t/09arrays.t (original)
+++ trunk/libdbd-pg-perl/t/09arrays.t Mon Sep 22 19:57:37 2008
@@ -499,6 +499,10 @@
 	eval { require Encode; };
 	skip ('Encode module is needed for unicode tests', 14) if $@;
 
+	my $server_encoding = $dbh->selectall_arrayref('SHOW server_encoding')->[0][0];
+	skip ('Cannot test unicode with a LATIN1 database', 14)
+		if $server_encoding eq 'LATIN1';
+
 	$t='String should be UTF-8';
 	local $dbh->{pg_enable_utf8} = 1;
 	my $utf8_str = chr(0x100).'dam'; # LATIN CAPITAL LETTER A WITH MACRON

Modified: trunk/libdbd-pg-perl/t/99_spellcheck.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-pg-perl/t/99_spellcheck.t?rev=25545&op=diff
==============================================================================
--- trunk/libdbd-pg-perl/t/99_spellcheck.t (original)
+++ trunk/libdbd-pg-perl/t/99_spellcheck.t Mon Sep 22 19:57:37 2008
@@ -483,6 +483,7 @@
 typename
 uid
 undef
+unicode
 unix
 UNKNOWNOID
 userid
@@ -798,7 +799,6 @@
 lc
 msg
 uc
-unicode
 
 ## t/03smethod.t:
 ArrayTupleFetch




More information about the Pkg-perl-cvs-commits mailing list