summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION8
-rw-r--r--php-pecl-pq.spec12
-rw-r--r--pq-upstream.patch175
3 files changed, 11 insertions, 184 deletions
diff --git a/REFLECTION b/REFLECTION
index fe2a6c1..1211ad4 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #172 pq version 0.5.2 ] {
+Extension [ <persistent> extension #172 pq version 0.5.5 ] {
- Dependencies {
Dependency [ raphf (Required) ]
@@ -811,7 +811,7 @@ Extension [ <persistent> extension #172 pq version 0.5.2 ] {
Class [ <internal:pq> class pq\Types ] {
- - Constants [152] {
+ - Constants [156] {
Constant [ integer BOOL ] { 16 }
Constant [ integer BYTEA ] { 17 }
Constant [ integer CHAR ] { 18 }
@@ -924,6 +924,8 @@ Extension [ <persistent> extension #172 pq version 0.5.2 ] {
Constant [ integer REGTYPEARRAY ] { 2211 }
Constant [ integer UUID ] { 2950 }
Constant [ integer UUIDARRAY ] { 2951 }
+ Constant [ integer PG_LSN ] { 3220 }
+ Constant [ integer PG_LSNARRAY ] { 3221 }
Constant [ integer TSVECTOR ] { 3614 }
Constant [ integer GTSVECTOR ] { 3642 }
Constant [ integer TSQUERY ] { 3615 }
@@ -934,6 +936,8 @@ Extension [ <persistent> extension #172 pq version 0.5.2 ] {
Constant [ integer TSQUERYARRAY ] { 3645 }
Constant [ integer REGCONFIGARRAY ] { 3735 }
Constant [ integer REGDICTIONARYARRAY ] { 3770 }
+ Constant [ integer JSONB ] { 3802 }
+ Constant [ integer JSONBARRAY ] { 3807 }
Constant [ integer TXID_SNAPSHOT ] { 2970 }
Constant [ integer TXID_SNAPSHOTARRAY ] { 2949 }
Constant [ integer INT4RANGE ] { 3904 }
diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec
index 5f4ce31..83e9f21 100644
--- a/php-pecl-pq.spec
+++ b/php-pecl-pq.spec
@@ -30,16 +30,13 @@
Summary: PostgreSQL client library (libpq) binding
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 0.5.2
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 0.5.5
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-# Upstream patches
-Patch0: %{pecl_name}-upstream.patch
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: postgresql-devel > 9
BuildRequires: %{?scl_prefix}php-devel > 5.2
@@ -109,8 +106,6 @@ mv %{pecl_name}-%{version} NTS
sed -e '/role="test"/d' -i package.xml
cd NTS
-%patch0 -p1 -b .upstream
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h)
if test "x${extver}" != "x%{version}"; then
@@ -269,6 +264,9 @@ rm -rf %{buildroot}
%changelog
+* Sat Oct 25 2014 Remi Collet <remi@fedoraproject.org> - 0.5.5-1
+- Update to 0.5.5
+
* Sat Oct 18 2014 Remi Collet <remi@fedoraproject.org> - 0.5.2-2
- launch a postgresql server for test
- enable upstream test suite during build
diff --git a/pq-upstream.patch b/pq-upstream.patch
deleted file mode 100644
index bdcc63a..0000000
--- a/pq-upstream.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From ab8bb315a8ff53835175250191facedf8119f6d3 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Fri, 17 Oct 2014 10:27:05 +0200
-Subject: [PATCH 1/2] get rid of remaining HAVE_JSON, use
- PHP_PQ_HAVE_PHP_JSON_H everywhere
-
----
- src/php_pq_params.c | 4 ++--
- src/php_pqres.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/php_pq_params.c b/src/php_pq_params.c
-index 0cc370d..9554ef7 100644
---- a/src/php_pq_params.c
-+++ b/src/php_pq_params.c
-@@ -88,7 +88,7 @@ static zval *object_param_to_string(php_pq_params_t *p, zval *zobj, Oid type TSR
- smart_str str = {0};
-
- switch (type) {
--#if HAVE_JSON && defined(PHP_PQ_OID_JSON)
-+#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
- # ifdef PHP_PQ_OID_JSONB
- case PHP_PQ_OID_JSONB:
- # endif
-@@ -227,7 +227,7 @@ static zval *array_param_to_string(php_pq_params_t *p, zval *zarr, Oid type TSRM
- struct apply_to_param_from_array_arg arg = {NULL};
-
- switch (type) {
--#if HAVE_JSON && defined(PHP_PQ_OID_JSON)
-+#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
- # ifdef PHP_PQ_OID_JSONB
- case PHP_PQ_OID_JSONB:
- # endif
-diff --git a/src/php_pqres.c b/src/php_pqres.c
-index 2853275..ae8774d 100644
---- a/src/php_pqres.c
-+++ b/src/php_pqres.c
-@@ -176,7 +176,7 @@ zval *php_pqres_typed_zval(php_pqres_t *res, char *val, size_t len, Oid typ TSRM
- php_pqdt_from_string(val, len, "Y-m-d H:i:s.uO", zv TSRMLS_CC);
- break;
-
--#if HAVE_JSON && defined(PHP_PQ_OID_JSON)
-+#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
- # ifdef PHP_PQ_OID_JSONB
- case PHP_PQ_OID_JSONB:
- # endif
-@@ -1225,7 +1225,7 @@ PHP_MINIT_FUNCTION(pqres)
- zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_SCALAR"), PHP_PQRES_CONV_SCALAR TSRMLS_CC);
- zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_ARRAY"), PHP_PQRES_CONV_ARRAY TSRMLS_CC);
- zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_DATETIME"), PHP_PQRES_CONV_DATETIME TSRMLS_CC);
--#if HAVE_JSON
-+#if PHP_PQ_HAVE_PHP_JSON_H
- zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_JSON"), PHP_PQRES_CONV_JSON TSRMLS_CC);
- #endif
- zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_ALL"), PHP_PQRES_CONV_ALL TSRMLS_CC);
---
-1.8.3.1
-
-From 88bae9c9d9ee4d59febca3762d95546fe6e89663 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Fri, 17 Oct 2014 11:01:43 +0200
-Subject: [PATCH 2/2] fix check for PG constant
-
----
- config.m4 | 16 +++++++++++-----
- src/php_pqres.c | 4 ++--
- 2 files changed, 13 insertions(+), 7 deletions(-)
-
-diff --git a/config.m4 b/config.m4
-index 63dfd22..4e08f67 100644
---- a/config.m4
-+++ b/config.m4
-@@ -27,15 +27,21 @@ if test "$PHP_PQ" != "no"; then
- AC_CHECK_PROG(EGREP, egrep, egrep)
- ])
-
-- for PQ_DEF in PGRES_SINGLE_TUPLE PGRES_COPY_BOTH; do
-- AC_MSG_CHECKING(for $PQ_DEF)
-- if $EGREP -q $PQ_DEF $PQ_DIR/include/libpq-fe.h; then
-- AC_DEFINE([$PQ_DEF], [1], [Have $PQ_DEF])
-+ dnl
-+ dnl PQ_CHECK_CONST(name)
-+ dnl
-+ AC_DEFUN([PQ_CHECK_CONST], [
-+ AC_MSG_CHECKING(for $1)
-+ if $EGREP -q $1 $PQ_DIR/include/libpq-fe.h; then
-+ AC_DEFINE(HAVE_$1, 1, [Have $1])
- AC_MSG_RESULT(yep)
- else
- AC_MSG_RESULT(nope)
- fi
-- done
-+ ])
-+
-+ PQ_CHECK_CONST(PGRES_SINGLE_TUPLE)
-+ PQ_CHECK_CONST(PGRES_COPY_BOTH)
-
-
- dnl
-diff --git a/src/php_pqres.c b/src/php_pqres.c
-index ae8774d..9dda107 100644
---- a/src/php_pqres.c
-+++ b/src/php_pqres.c
-@@ -82,7 +82,7 @@ static STATUS php_pqres_iterator_valid(zend_object_iterator *i TSRMLS_DC)
-
- switch (PQresultStatus(obj->intern->res)) {
- case PGRES_TUPLES_OK:
--#if HAVE_PGRES_SINGLE_TUPLE
-+#ifdef HAVE_PGRES_SINGLE_TUPLE
- case PGRES_SINGLE_TUPLE:
- #endif
- if (PQntuples(obj->intern->res) <= iter->index) {
-@@ -1211,7 +1211,7 @@ PHP_MINIT_FUNCTION(pqres)
- #ifdef HAVE_PGRES_COPY_BOTH
- zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("COPY_BOTH"), PGRES_COPY_BOTH TSRMLS_CC);
- #endif
--#if HAVE_PGRES_SINGLE_TUPLE
-+#ifdef HAVE_PGRES_SINGLE_TUPLE
- zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("SINGLE_TUPLE"), PGRES_SINGLE_TUPLE TSRMLS_CC);
- #endif
-
---
-1.8.3.1
-
-From 5a5758352bbc42cbe57f32859de831de2ea08a86 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Sat, 18 Oct 2014 15:15:08 +0200
-Subject: [PATCH] allow INT8 / TID on 32 bits
-
----
- src/php_pqres.c | 19 ++++++++++++++++---
- 1 file changed, 16 insertions(+), 3 deletions(-)
-
-diff --git a/src/php_pqres.c b/src/php_pqres.c
-index 9dda107..75a6081 100644
---- a/src/php_pqres.c
-+++ b/src/php_pqres.c
-@@ -126,10 +126,9 @@ zval *php_pqres_typed_zval(php_pqres_t *res, char *val, size_t len, Oid typ TSRM
- }
- ZVAL_BOOL(zv, *val == 't');
- break;
--#if SIZEOF_LONG >= 8
-+
- case PHP_PQ_OID_INT8:
- case PHP_PQ_OID_TID:
--#endif
- case PHP_PQ_OID_INT4:
- case PHP_PQ_OID_INT2:
- case PHP_PQ_OID_XID:
-@@ -137,7 +136,21 @@ zval *php_pqres_typed_zval(php_pqres_t *res, char *val, size_t len, Oid typ TSRM
- if (!(res->auto_convert & PHP_PQRES_CONV_INT)) {
- goto noconversion;
- }
-- ZVAL_LONG(zv, zend_atol(val, len));
-+ {
-+ long lval;
-+ double dval;
-+
-+ switch (is_numeric_string(val, len, &lval, &dval, 0)) {
-+ case IS_LONG:
-+ ZVAL_LONG(zv, lval);
-+ break;
-+ case IS_DOUBLE:
-+ ZVAL_DOUBLE(zv, dval);
-+ break;
-+ default:
-+ goto noconversion;
-+ }
-+ }
- break;
-
- case PHP_PQ_OID_FLOAT4:
---
-2.1.0
-