aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2019-08-16 18:09:24 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2019-08-16 18:09:24 +0000
commit9a656772b7d07952779caa5985e92952c305b4cb (patch)
tree8a15337007bb9ae23fd919903d993068360d231f
parent3532947821ec0352bb4d34296afc0718ab81f332 (diff)
downloadports-9a656772b7d07952779caa5985e92952c305b4cb.tar.gz
ports-9a656772b7d07952779caa5985e92952c305b4cb.zip
Notes
-rw-r--r--databases/postgresql-plproxy/files/patch-src-cluster.c26
-rw-r--r--databases/postgresql-plproxy/files/patch-src-execute.c29
-rw-r--r--databases/postgresql-plproxy/files/patch-src-function.c16
3 files changed, 71 insertions, 0 deletions
diff --git a/databases/postgresql-plproxy/files/patch-src-cluster.c b/databases/postgresql-plproxy/files/patch-src-cluster.c
new file mode 100644
index 000000000000..744f38cbfde6
--- /dev/null
+++ b/databases/postgresql-plproxy/files/patch-src-cluster.c
@@ -0,0 +1,26 @@
+--- src/cluster.c.orig 2017-10-08 08:53:35 UTC
++++ src/cluster.c
+@@ -588,7 +588,11 @@ reload_sqlmed_user(ProxyFunction *func,
+ */
+ aclresult = pg_foreign_server_aclcheck(um->serverid, um->userid, ACL_USAGE);
+ if (aclresult != ACLCHECK_OK)
++#if PG_VERSION_NUM >= 110000
++ aclcheck_error(aclresult, OBJECT_FOREIGN_SERVER, cluster->name);
++#else
+ aclcheck_error(aclresult, ACL_KIND_FOREIGN_SERVER, cluster->name);
++#endif
+
+ /* Extract the common connect string elements from user mapping */
+ got_user = false;
+@@ -657,7 +661,11 @@ reload_sqlmed_cluster(ProxyFunction *fun
+ */
+ aclresult = pg_foreign_server_aclcheck(foreign_server->serverid, info->user_oid, ACL_USAGE);
+ if (aclresult != ACLCHECK_OK)
++#if PG_VERSION_NUM >= 110000
++ aclcheck_error(aclresult, OBJECT_FOREIGN_SERVER, foreign_server->servername);
++#else
+ aclcheck_error(aclresult, ACL_KIND_FOREIGN_SERVER, foreign_server->servername);
++#endif
+
+ /* drop old config values */
+ clear_config(&cluster->config);
diff --git a/databases/postgresql-plproxy/files/patch-src-execute.c b/databases/postgresql-plproxy/files/patch-src-execute.c
new file mode 100644
index 000000000000..61a68b920bec
--- /dev/null
+++ b/databases/postgresql-plproxy/files/patch-src-execute.c
@@ -0,0 +1,29 @@
+HAVE_NETINET_IN_H and HAVE_SYS_SOCKET_H were removed from pg_config.h in PostgreSQL 10
+HAVE_NETINET_TCP_H was removed from pg_config.h in PostgreSQL 11
+
+--- src/execute.c.orig 2017-10-08 08:53:35 UTC
++++ src/execute.c
+@@ -28,6 +28,7 @@
+ #include "plproxy.h"
+
+ #include <sys/time.h>
++#include <sys/types.h>
+
+ #include "poll_compat.h"
+
+@@ -35,15 +36,9 @@
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #endif
+-#ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+-#endif
+-#ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+-#endif
+-#ifdef HAVE_NETINET_TCP_H
+ #include <netinet/tcp.h>
+-#endif
+ #ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+ #endif
diff --git a/databases/postgresql-plproxy/files/patch-src-function.c b/databases/postgresql-plproxy/files/patch-src-function.c
new file mode 100644
index 000000000000..0ee9cd9622a3
--- /dev/null
+++ b/databases/postgresql-plproxy/files/patch-src-function.c
@@ -0,0 +1,16 @@
+--- src/function.c.orig 2017-10-08 08:53:35 UTC
++++ src/function.c
+@@ -214,8 +214,13 @@ fn_returns_dynamic_record(HeapTuple proc
+ Form_pg_proc proc_struct;
+ proc_struct = (Form_pg_proc) GETSTRUCT(proc_tuple);
+ if (proc_struct->prorettype == RECORDOID
++#if PG_VERSION_NUM >= 110000
++ && (heap_attisnull(proc_tuple, Anum_pg_proc_proargmodes, NULL)
++ || heap_attisnull(proc_tuple, Anum_pg_proc_proargnames, NULL)))
++#else
+ && (heap_attisnull(proc_tuple, Anum_pg_proc_proargmodes)
+ || heap_attisnull(proc_tuple, Anum_pg_proc_proargnames)))
++#endif
+ return true;
+ return false;
+ }