[DBD::Pg 3/3] Return bigint values as plain integer values when they fit

dbdpg-commits-gENoVmVU/[email protected] Wed, 8 Apr 2015 23:21:47 +0000
Newsgroups gmane.comp.db.postgresql.dbdpg.cvs
Message-ID <[email protected]>
Committed by =3D?UTF-8?q?Dagfinn=3D20Ilmari=3D20Manns=3DC3=3DA5ker?=3D <i=
[email protected]>

Subject: [DBD::Pg 3/3] Return bigint values as plain integer values when =
they
fit

---
 Changes  | 3 +++
 dbdimp.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/Changes b/Changes
index f6a19e9..5dd0280 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,9 @@
   - Fix enum value ordering on Postgres servers 9.1 and greater
     [Dagfinn Ilmari Manns=C3=A5ker]
=20
+  - Return bigint values as plain integer values when they fit
+    [Dagfinn Ilmari Manns=C3=A5ker]
+
 Version 3.5.1  Released February 17, 2015 (git commit 6c3457ee20c19ae492=
d29c490af6800e7e6a0774)
=20
   - Prevent core dump if the second argument to the quote() method=20
diff --git a/dbdimp.c b/dbdimp.c
index 92a102c..e4710b8 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -3716,6 +3716,9 @@ AV * dbd_st_fetch (SV * sth, imp_sth_t * imp_sth)
 						break;
 					case PG_INT4:
 					case PG_INT2:
+#if IVSIZE >=3D 8 && LONGSIZE >=3D 8
+					case PG_INT8:
+#endif
 						sv_setiv(sv, atol((char *)value));
 						break;
 					default:
--=20
1.8.4