From 5a017b96ad4a5b02907c6cea651d711f8fca615a Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Mon, 27 Sep 1999 20:04:14 +0000
Subject: [PATCH] Apply contrib patch from Massimo

---
 contrib/Makefile                        | 7 +++++++
 contrib/array/Makefile                  | 7 +++++++
 contrib/array/array_iterator.c          | 5 ++++-
 contrib/array/array_iterator.doc        | 5 +++++
 contrib/datetime/Makefile               | 7 +++++++
 contrib/datetime/datetime_functions.c   | 4 ++--
 contrib/datetime/datetime_functions.doc | 7 +++++++
 contrib/miscutil/Makefile               | 7 +++++++
 contrib/miscutil/misc_utils.c           | 2 +-
 contrib/miscutil/misc_utils.doc         | 4 ++++
 contrib/string/Makefile                 | 7 +++++++
 contrib/string/string_io.c              | 4 ++--
 contrib/string/string_io.doc            | 7 +++++++
 contrib/userlock/Makefile               | 7 +++++++
 contrib/userlock/user_locks.c           | 4 ++--
 contrib/userlock/user_locks.doc         | 5 +++++
 16 files changed, 81 insertions(+), 8 deletions(-)

diff --git a/contrib/Makefile b/contrib/Makefile
index f74678b184c..7485110ed5f 100644
--- a/contrib/Makefile
+++ b/contrib/Makefile
@@ -30,6 +30,13 @@ install:
 	    fi; \
 	done
 
+install-doc:	
+	for dir in *; do \
+	    if [ -e $$dir/Makefile ]; then \
+		$(MAKE) -C $$dir $@ ; \
+	    fi; \
+	done || exit 0
+
 clean:	
 	for dir in *; do \
 	    if [ -e $$dir/Makefile ]; then \
diff --git a/contrib/array/Makefile b/contrib/array/Makefile
index 5607b4e5370..85e8d42ade4 100644
--- a/contrib/array/Makefile
+++ b/contrib/array/Makefile
@@ -39,6 +39,13 @@ install:	$(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
 		strip $(MODDIR)/$(MODULE)
 		cp -p $(SQLDEFS) $(SQLDIR)/
 
+install-doc:	
+		if [ -d "$(DOCDIR)" ]; then \
+		    cp -p *.doc $(DOCDIR); \
+		else \
+		    cp -p *.doc $(SQLDIR); \
+		fi
+
 $(MODDIR):
 		mkdir -p $@
 
diff --git a/contrib/array/array_iterator.c b/contrib/array/array_iterator.c
index 27902e585f8..5417d2da52f 100644
--- a/contrib/array/array_iterator.c
+++ b/contrib/array/array_iterator.c
@@ -6,9 +6,12 @@
  * elements of the array and the value and compute a result as
  * the logical OR or AND of the iteration results.
  *
- * Copyright (c) 1997, Massimo Dal Zotto <dz@cs.unitn.it>
+ * Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
  * ported to postgreSQL 6.3.2,added oid_functions, 18.1.1999,
  * Tobias Gabele <gabele@wiz.uni-kassel.de>
+ *
+ * This software is distributed under the GNU General Public License
+ * either version 2, or (at your option) any later version.
  */
 
 #include <ctype.h>
diff --git a/contrib/array/array_iterator.doc b/contrib/array/array_iterator.doc
index 031301799c6..b072ebe3970 100644
--- a/contrib/array/array_iterator.doc
+++ b/contrib/array/array_iterator.doc
@@ -1,4 +1,9 @@
 Array iterator functions, by Massimo Dal Zotto <dz@cs.unitn.it>
+Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
+
+This software is distributed under the GNU General Public License
+either version 2, or (at your option) any later version.
+
 
 This loadable module defines a new class of functions which take
 an array and a scalar value, iterate a scalar operator over the
diff --git a/contrib/datetime/Makefile b/contrib/datetime/Makefile
index 5a575d07eb4..b53293e1722 100644
--- a/contrib/datetime/Makefile
+++ b/contrib/datetime/Makefile
@@ -39,6 +39,13 @@ install:	$(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
 		strip $(MODDIR)/$(MODULE)
 		cp -p $(SQLDEFS) $(SQLDIR)/
 
+install-doc:	
+		if [ -d "$(DOCDIR)" ]; then \
+		    cp -p *.doc $(DOCDIR); \
+		else \
+		    cp -p *.doc $(SQLDIR); \
+		fi
+
 $(MODDIR):
 		mkdir -p $@
 
diff --git a/contrib/datetime/datetime_functions.c b/contrib/datetime/datetime_functions.c
index 54995220042..910647118aa 100644
--- a/contrib/datetime/datetime_functions.c
+++ b/contrib/datetime/datetime_functions.c
@@ -3,9 +3,9 @@
  *
  * This file defines new functions for the time and date data types.
  *
- * Copyright (c) 1998, Massimo Dal Zotto <dz@cs.unitn.it>
+ * Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
  *
- * This file is distributed under the GNU General Public License
+ * This software is distributed under the GNU General Public License
  * either version 2, or (at your option) any later version.
  */
 
diff --git a/contrib/datetime/datetime_functions.doc b/contrib/datetime/datetime_functions.doc
index 33b41d02181..66f4d376d61 100644
--- a/contrib/datetime/datetime_functions.doc
+++ b/contrib/datetime/datetime_functions.doc
@@ -1,3 +1,10 @@
+Datetime functions.
+Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
+
+This software is distributed under the GNU General Public License
+either version 2, or (at your option) any later version.
+
+
 I have written some new funtions for time and date data types which can
 be used to extract hour,minutes,seconds from time values, and year,
 month,day from a date. There is also a time_difference and functions
diff --git a/contrib/miscutil/Makefile b/contrib/miscutil/Makefile
index 88372da0f7a..fa3c99fa1db 100644
--- a/contrib/miscutil/Makefile
+++ b/contrib/miscutil/Makefile
@@ -39,6 +39,13 @@ install:	$(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
 		strip $(MODDIR)/$(MODULE)
 		cp -p $(SQLDEFS) $(SQLDIR)/
 
+install-doc:	
+		if [ -d "$(DOCDIR)" ]; then \
+		    cp -p *.doc $(DOCDIR); \
+		else \
+		    cp -p *.doc $(SQLDIR); \
+		fi
+
 $(MODDIR):
 		mkdir -p $@
 
diff --git a/contrib/miscutil/misc_utils.c b/contrib/miscutil/misc_utils.c
index d9237bd9dbb..21341dc73c9 100644
--- a/contrib/miscutil/misc_utils.c
+++ b/contrib/miscutil/misc_utils.c
@@ -3,7 +3,7 @@
  *
  * This file defines miscellaneous PostgreSQL utility functions.
  *
- * Copyright (c) 1998, Massimo Dal Zotto <dz@cs.unitn.it>
+ * Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
  *
  * This file is distributed under the GNU General Public License
  * either version 2, or (at your option) any later version.
diff --git a/contrib/miscutil/misc_utils.doc b/contrib/miscutil/misc_utils.doc
index d1e3ac29ab8..903455513a2 100644
--- a/contrib/miscutil/misc_utils.doc
+++ b/contrib/miscutil/misc_utils.doc
@@ -1,4 +1,8 @@
 Miscellaneous utility functions for PostgreSQL.
+Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
+
+This software is distributed under the GNU General Public License
+either version 2, or (at your option) any later version.
 
 query_limit(n)
 
diff --git a/contrib/string/Makefile b/contrib/string/Makefile
index 879fd2387f9..b77ace937cf 100644
--- a/contrib/string/Makefile
+++ b/contrib/string/Makefile
@@ -39,6 +39,13 @@ install:	$(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
 		strip $(MODDIR)/$(MODULE)
 		cp -p $(SQLDEFS) $(SQLDIR)/
 
+install-doc:	
+		if [ -d "$(DOCDIR)" ]; then \
+		    cp -p *.doc $(DOCDIR); \
+		else \
+		    cp -p *.doc $(SQLDIR); \
+		fi
+
 $(MODDIR):
 		mkdir -p $@
 
diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c
index f28968cbe54..e1fc867497f 100644
--- a/contrib/string/string_io.c
+++ b/contrib/string/string_io.c
@@ -3,9 +3,9 @@
  *
  * This file defines C-like input/output conversion routines for strings.
  *
- * Copyright (c) 1998, Massimo Dal Zotto <dz@cs.unitn.it>
+ * Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
  *
- * This file is distributed under the GNU General Public License
+ * This software is distributed under the GNU General Public License
  * either version 2, or (at your option) any later version.
  */
 
diff --git a/contrib/string/string_io.doc b/contrib/string/string_io.doc
index af4b9747859..4b4d10166f8 100644
--- a/contrib/string/string_io.doc
+++ b/contrib/string/string_io.doc
@@ -1,3 +1,10 @@
+String io module for postgresql.
+Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
+
+This software is distributed under the GNU General Public License
+either version 2, or (at your option) any later version.
+
+
 These output functions can be used as substitution of the standard text
 output functions to get the value of text fields printed in the format
 used for C strings. This allows the output of queries or the exported
diff --git a/contrib/userlock/Makefile b/contrib/userlock/Makefile
index e6cc6c37aff..391956ad7e7 100644
--- a/contrib/userlock/Makefile
+++ b/contrib/userlock/Makefile
@@ -39,6 +39,13 @@ install:	$(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
 		strip $(MODDIR)/$(MODULE)
 		cp -p $(SQLDEFS) $(SQLDIR)/
 
+install-doc:	
+		if [ -d "$(DOCDIR)" ]; then \
+		    cp -p *.doc $(DOCDIR); \
+		else \
+		    cp -p *.doc $(SQLDIR); \
+		fi
+
 $(MODDIR):
 		mkdir -p $@
 
diff --git a/contrib/userlock/user_locks.c b/contrib/userlock/user_locks.c
index 8631d2f6067..1a596d51540 100644
--- a/contrib/userlock/user_locks.c
+++ b/contrib/userlock/user_locks.c
@@ -4,9 +4,9 @@
  * This loadable module, together with my user-lock.patch applied to the
  * backend, provides support for user-level long-term cooperative locks.
  *
- * Copyright (c) 1998, Massimo Dal Zotto <dz@cs.unitn.it>
+ * Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
  *
- * This file is distributed under the GNU General Public License
+ * This software is distributed under the GNU General Public License
  * either version 2, or (at your option) any later version.
  */
 
diff --git a/contrib/userlock/user_locks.doc b/contrib/userlock/user_locks.doc
index c7a4321dec7..4c923a46577 100644
--- a/contrib/userlock/user_locks.doc
+++ b/contrib/userlock/user_locks.doc
@@ -1,4 +1,9 @@
 User locks, by Massimo Dal Zotto <dz@cs.unitn.it>
+Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
+
+This software is distributed under the GNU General Public License
+either version 2, or (at your option) any later version.
+
 
 This loadable module, together with my user-lock.patch applied to the
 backend, provides support for user-level long-term cooperative locks.
-- 
GitLab