Committed by Greg Sabino Mullane <[email protected]>

Add support to start testing arrays of bytea

---
 t/06bytea.t           | 8 +++++---
 t/dbdpg_test_setup.pl | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/t/06bytea.t b/t/06bytea.t
index c08a738..44a8cb8 100644
--- a/t/06bytea.t
+++ b/t/06bytea.t
@@ -28,12 +28,13 @@ if ($pgversion >= 80100) {
 
 my ($sth, $t);
 
-$sth = $dbh->prepare(q{INSERT INTO dbd_pg_test (id,bytetest) VALUES (?,?)});
+$sth = $dbh->prepare(q{INSERT INTO dbd_pg_test (id,bytetest,bytearray) VALUES 
(?,?,'{1,2,3}')});
 
 $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);
+ok ($sth->execute(400, 'aa\\bb\\cc\\\0dd\\'
+), $t);
 
 $t='bytea insert test with string containing a single quote';
 ok ($sth->execute(401, '\''), $t);
@@ -52,7 +53,8 @@ ok ($sth->execute(404, $binary_out), $t);
 if ($pgversion < 90000) {
     test_outputs(undef);
     SKIP: { skip 'No BYTEA output format setting before 9.0', 5 }
-} else {
+}
+else {
     test_outputs($_) for qw(hex escape);
 }
 
diff --git a/t/dbdpg_test_setup.pl b/t/dbdpg_test_setup.pl
index 1141831..d02bbca 100644
--- a/t/dbdpg_test_setup.pl
+++ b/t/dbdpg_test_setup.pl
@@ -668,7 +668,8 @@ CREATE TABLE dbd_pg_test (
   testarray3 bool[],
   "CaseTest" boolean,
   expo       numeric(6,2),
-  bytetest   bytea
+  bytetest   bytea,
+  bytearray  bytea[]
 )
 };
 
-- 
1.8.4

Reply via email to