From f4b8a5058dd6ba9c416c394254c1e02c1d863bcd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 29 Nov 2021 07:40:27 +0100 Subject: update to 4.8.0 enable postgresql support add fix for old postgresql 9 in EL-7 from https://github.com/openswoole/swoole-src/pull/84 --- openswoole-pg9.patch | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 openswoole-pg9.patch (limited to 'openswoole-pg9.patch') diff --git a/openswoole-pg9.patch b/openswoole-pg9.patch new file mode 100644 index 0000000..e0e402b --- /dev/null +++ b/openswoole-pg9.patch @@ -0,0 +1,36 @@ +From 21d86e3d6d62b70ffc9ecc22e651f15162c462f3 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 29 Nov 2021 07:29:22 +0100 +Subject: [PATCH] fix build with postgresql 9 + +--- + ext-src/swoole_postgres_coro.cc | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/ext-src/swoole_postgres_coro.cc b/ext-src/swoole_postgres_coro.cc +index 06362e6f0..11e467225 100644 +--- a/ext-src/swoole_postgres_coro.cc ++++ b/ext-src/swoole_postgres_coro.cc +@@ -539,6 +539,22 @@ static int meta_data_result_parse(PGObject *object) { + return SW_OK; + } + ++#ifndef PG_DIAG_SCHEMA_NAME ++# define PG_DIAG_SCHEMA_NAME 's' ++#endif ++#ifndef PG_DIAG_TABLE_NAME ++# define PG_DIAG_TABLE_NAME 't' ++#endif ++#ifndef PG_DIAG_COLUMN_NAME ++# define PG_DIAG_COLUMN_NAME 'c' ++#endif ++#ifndef PG_DIAG_DATATYPE_NAME ++# define PG_DIAG_DATATYPE_NAME 'd' ++#endif ++#ifndef PG_DIAG_CONSTRAINT_NAME ++# define PG_DIAG_CONSTRAINT_NAME 'n' ++#endif ++ + static void set_error_diag(const PGObject *object, const PGresult *pgsql_result) { + const unsigned int error_codes[] = {PG_DIAG_SEVERITY, + PG_DIAG_SQLSTATE, -- cgit