From 328f51af69a92bdeb58c91010eaffdf5daec013c Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Thu, 29 Jun 2023 17:17:45 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .gitignore | 5 ++++- pgaudit-pgsql12compat.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 pgaudit-pgsql12compat.patch diff --git a/.gitignore b/.gitignore index fa94880..e3eeb88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ -SOURCES/pgaudit-1.5.0.tar.gz +/pgaudit-1.2.0.tar.gz +/pgaudit-1.3.0.tar.gz +/pgaudit-1.3.1.tar.gz +/pgaudit-1.4.0.tar.gz /pgaudit-1.5.0.tar.gz diff --git a/pgaudit-pgsql12compat.patch b/pgaudit-pgsql12compat.patch new file mode 100644 index 0000000..a0f6ccc --- /dev/null +++ b/pgaudit-pgsql12compat.patch @@ -0,0 +1,29 @@ +diff -rup pgaudit-1.3.0-orig/pgaudit.c pgaudit-1.3.0/pgaudit.c +--- pgaudit-1.3.0-orig/pgaudit.c 2019-07-26 08:32:56.173668080 +0200 ++++ pgaudit-1.3.0/pgaudit.c 2019-07-26 10:56:47.956677102 +0200 +@@ -13,6 +13,7 @@ + #include "access/htup_details.h" + #include "access/sysattr.h" + #include "access/xact.h" ++#include "access/relation.h" + #include "catalog/catalog.h" + #include "catalog/objectaccess.h" + #include "catalog/pg_class.h" +@@ -994,7 +995,7 @@ log_select_dml(Oid auditOid, List *range + relOid = rte->relid; + rel = relation_open(relOid, NoLock); + +- if (!auditLogCatalog && IsSystemNamespace(RelationGetNamespace(rel))) ++ if (!auditLogCatalog && IsCatalogNamespace(RelationGetNamespace(rel))) + { + relation_close(rel, NoLock); + continue; +@@ -1206,7 +1207,7 @@ log_function_execute(Oid objectId) + * Logging execution of all pg_catalog functions would make the log + * unusably noisy. + */ +- if (IsSystemNamespace(proc->pronamespace)) ++ if (IsCatalogNamespace(proc->pronamespace)) + { + ReleaseSysCache(proctup); + return;