Subject: | [PATCH] Use correct SQL_BIGINT constant for int8 |
Date: | Sun, 29 Sep 2013 17:39:42 +0200 |
To: | bug-DBD-Pg [...] rt.cpan.org |
From: | ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker) |
SQL_BIGINT has been exported by DBI since version 1.54, so bump the
version requirement and use that instead of the incorrect SQL_DOUBLE.
--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law
From 9704e26e6a3a7762993f418025711b63a3e960ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Sun, 29 Sep 2013 16:28:22 +0100
Subject: [PATCH] Use correct SQL_BIGINT constant for int8
SQL_BIGINT has been exported by DBI since version 1.54, so bump the
version requirement and use that instead of the incorrect SQL_DOUBLE.
---
Makefile.PL | 2 +-
Pg.pm | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index 1510ea2..e462846 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -204,7 +204,7 @@ my %opts =
ABSTRACT => 'PostgreSQL database driver for the DBI module',
PREREQ_PM => {
'ExtUtils::MakeMaker' => '6.11',
- 'DBI' => '1.52',
+ 'DBI' => '1.54',
'Test::More' => '0.61',
'Time::HiRes' => '0',
'version' => '0',
diff --git a/Pg.pm b/Pg.pm
index c620d21..da2b308 100644
--- a/Pg.pm
+++ b/Pg.pm
@@ -1345,8 +1345,8 @@ use 5.006001;
SQL_FLOAT, $UN, $UN, $UN ],
['float8', SQL_REAL, 15, $UN,$UN, $PS, 1,0,2, 0,0,0, 'REAL', 0,15,
SQL_REAL, $UN, $UN, $UN ],
-['int8', SQL_DOUBLE, 20, $UN,$UN, $UN, 1,0,2, 0,0,0, 'LONGINT', 0,0,
- SQL_DOUBLE, $UN, $UN, $UN ],
+['int8', SQL_BIGINT, 20, $UN,$UN, $UN, 1,0,2, 0,0,0, 'LONGINT', 0,0,
+ SQL_BIGINT, $UN, $UN, $UN ],
['date', SQL_DATE, 10, q{'},q{'}, $UN, 1,0,2, $UN,0,0, 'DATE', 0,0,
SQL_DATE, $UN, $UN, $UN ],
['tinterval',SQL_TIME, 18, q{'},q{'}, $UN, 1,0,2, $UN,0,0, 'TINTERVAL', 0,6,
@@ -1386,7 +1386,7 @@ use 5.006001;
# Set up lookup for SQL types we don't want to escape.
my %no_escape = map { $_ => 1 }
- DBI::SQL_INTEGER, DBI::SQL_SMALLINT, DBI::SQL_DECIMAL,
+ DBI::SQL_INTEGER, DBI::SQL_SMALLINT, DBI::SQL_BIGINT, DBI::SQL_DECIMAL,
DBI::SQL_FLOAT, DBI::SQL_REAL, DBI::SQL_DOUBLE, DBI::SQL_NUMERIC;
sub get_info {
@@ -3006,7 +3006,7 @@ according to the following table:
| varchar | VARCHAR(n) |
| int2 | SMALLINT |
| int4 | INT |
- | int8 | / |
+ | int8 | BIGINT |
| money | / |
| float4 | FLOAT(p) p<7=float4, p<16=float8 |
| float8 | REAL |
--
1.8.1.2