diff options
author | vanilla <vanilla@FreeBSD.org> | 2002-02-19 16:23:22 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2002-02-19 16:23:22 +0800 |
commit | c33f7068ab8951cf28a03d622fcb1db2b8e2087f (patch) | |
tree | 8eb7feeb8d3a3e4db65edec78ec515e5dd83bcf2 /databases/postgresql83-server/files | |
parent | aea467d86f48f60787be314bdfcb602bedf75c61 (diff) | |
download | freebsd-ports-gnome-c33f7068ab8951cf28a03d622fcb1db2b8e2087f.tar.gz freebsd-ports-gnome-c33f7068ab8951cf28a03d622fcb1db2b8e2087f.tar.zst freebsd-ports-gnome-c33f7068ab8951cf28a03d622fcb1db2b8e2087f.zip |
Upgrade to 7.2, and spilit into several ports.
PR: ports/34855
Submitted by: maintainer.
Diffstat (limited to 'databases/postgresql83-server/files')
10 files changed, 128 insertions, 191 deletions
diff --git a/databases/postgresql83-server/files/502.pgsql b/databases/postgresql83-server/files/502.pgsql new file mode 100644 index 000000000000..160de10370e0 --- /dev/null +++ b/databases/postgresql83-server/files/502.pgsql @@ -0,0 +1,76 @@ +#!/bin/sh +# +# $Id: 502.pgsql.in,v 1.17 2001/10/29 10:12:32 henrik Exp $ +# +# Maintenance shell script to vacuum and backup database +# Put this in /usr/local/etc/periodic/daily, and it will be run +# every night +# +# Written by Palle Girgensohn <girgen@partitur.se> +# +# In public domain, do what you like with it, +# and use it at your own risk... :) +# + +DIR=`dirname $0` +progname=`basename $0` +PRG=`cd $DIR; pwd `/$progname + +# Run as user pgsql +if [ `id -un` != pgsql ]; then + su -l pgsql -c ${PRG} + exit 0 +fi + +# PGBACKUPDIR must be writeable by user pgsql +# ~pgsql is just that under normal circumstances, +# but this might not be where you want the backups... +PGBACKUPDIR=${HOME}/backups +if [ ! -d ${PGBACKUPDIR} ] ; then + echo Creating ${PGBACKUPDIR} + mkdir ${PGBACKUPDIR} + chmod 700 ${PGBACKUPDIR} +fi + +PGLOGDIR=/var/log/pgsql +PGDIR=`cd ${PGDATA}/../ && pwd` + +GZIP=/usr/bin/bzip2 +GZIPEXT=bz2 + +echo +echo "PostgreSQL maintenance..." + +# Protect the data +umask 077 + +dbname=`${PGBINDIR}/psql -q -t -A -d template1 -c "SELECT datname FROM pg_database WHERE datname != 'template0'"` + +rc=0 + +echo -n "ALL" +PGERRALL=/tmp/PGERRALL.$$ + +${PGBINDIR}/pg_dumpall 2> $PGERRALL | ${GZIP} > ${PGBACKUPDIR}/pgdumpall_`date "+%Y%m%d"`.${GZIPEXT} + +for i in ${dbname}; do + echo -n " $i" + ${PGBINDIR}/pg_dump $i 2>> $PGERRALL | ${GZIP} > ${PGBACKUPDIR}/pgdump_${i}_`date "+%Y%m%d"`.${GZIPEXT} + ${PGBINDIR}/vacuumdb --quiet --analyze $i || rc=3 +done + +if [ -s "${PGERRALL}" ] +then + echo + echo 'Something went wrong!' + echo + echo `cat ${PGERRALL}` + rc=3 +fi +rm ${PGERRALL} + +echo + +find ${PGBACKUPDIR} \( -name 'pgdump_*'.${GZIPEXT} -o -name 'pgdumpall_*'.${GZIPEXT} \) \ + -a -atime +7 -delete +exit $rc diff --git a/databases/postgresql83-server/files/patch-contrib-retep-build b/databases/postgresql83-server/files/patch-contrib-retep-build deleted file mode 100644 index 80f40f1cc86d..000000000000 --- a/databases/postgresql83-server/files/patch-contrib-retep-build +++ /dev/null @@ -1,37 +0,0 @@ -=================================================================== -RCS file: /home/projects/pgsql/cvsroot/pgsql/contrib/retep/build.xml,v -retrieving revision 1.4 -retrieving revision 1.5 -diff -u -r1.4 -r1.5 ---- contrib/retep/build.xml 2001/03/11 11:06:59 1.4 -+++ contrib/retep/build.xml 2001/05/16 16:20:51 1.5 -@@ -2,7 +2,7 @@ - - build file to build the donated retep tools packages - -- $Id: build.xml,v 1.4 2001/03/11 11:06:59 petere Exp $ -+ $Id: build.xml,v 1.5 2001/05/16 16:20:51 momjian Exp $ - - --> - -@@ -22,6 +22,11 @@ - <available property="xml" classname="org.xml.sax.Parser" /> - </target> - -+ <target name="warning" depends="checks" unless="jdk1.2+"> -+ <echo message="WARNING -- contributed retep tools need jdk1.2 or later -- compilation NOT done." /> -+ </target> -+ -+ - <!-- Prepares the build by creating a directory to place the class files --> - <target name="prepare"> - <mkdir dir="${dest}" /> -@@ -35,7 +40,7 @@ - </target> - - <!-- Builds the XML Tools --> -- <target name="compile" depends="checks,prepare"> -+ <target name="compile" depends="checks,prepare,warning" if="jdk1.2+"> - <javac srcdir="${src}" destdir="${dest}"> - <include name="${package}/**" /> - </javac> diff --git a/databases/postgresql83-server/files/patch-doc-makefile b/databases/postgresql83-server/files/patch-doc-makefile deleted file mode 100644 index fa27bed2af3f..000000000000 --- a/databases/postgresql83-server/files/patch-doc-makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- doc/Makefile~ Sun Jan 7 03:03:22 2001 -+++ doc/Makefile Wed Apr 18 08:12:30 2001 -@@ -43,10 +43,13 @@ - gzip -d -c man.tar.gz | ( cd $(DESTDIR)$(mandir) && $(TAR) xf - ) - endif - -- - installdirs: -- $(mkinstalldirs) $(DESTDIR)$(mandir) $(DESTDIR)$(docdir)/html -- -+ifdef found_html -+ $(mkinstalldirs) $(DESTDIR)$(docdir)/html -+endif -+ifdef found_man -+ $(mkinstalldirs) $(DESTDIR)$(mandir) -+endif - - uninstall: - ifdef found_html diff --git a/databases/postgresql83-server/files/patch-jdbc-Connection b/databases/postgresql83-server/files/patch-jdbc-Connection deleted file mode 100644 index 26fbc260d639..000000000000 --- a/databases/postgresql83-server/files/patch-jdbc-Connection +++ /dev/null @@ -1,51 +0,0 @@ -=================================================================== -RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Connection.java,v -retrieving revision 1.14 -retrieving revision 1.16 -diff -u -r1.14 -r1.16 ---- src/interfaces/jdbc/org/postgresql/Connection.java 2001/01/31 08:26:01 1.14 -+++ src/interfaces/jdbc/org/postgresql/Connection.java 2001/06/01 20:57:58 1.16 -@@ -10,7 +10,7 @@ - import org.postgresql.util.*; - - /** -- * $Id: Connection.java,v 1.14 2001/01/31 08:26:01 peter Exp $ -+ * $Id: Connection.java,v 1.16 2001/06/01 20:57:58 momjian Exp $ - * - * This abstract class is used by org.postgresql.Driver to open either the JDBC1 or - * JDBC2 versions of the Connection class. -@@ -267,7 +267,8 @@ - // - firstWarning = null; - -- java.sql.ResultSet initrset = ExecSQL("set datestyle to 'ISO'; select getdatabaseencoding()"); -+ java.sql.ResultSet initrset = ExecSQL("set datestyle to 'ISO'; " + -+ "select case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"); - - String dbEncoding = null; - //retrieve DB properties -@@ -307,9 +308,23 @@ - } else if (dbEncoding.equals("EUC_TW")) { - dbEncoding = "EUC_TW"; - } else if (dbEncoding.equals("KOI8")) { -- dbEncoding = "KOI8_R"; -+ // try first if KOI8_U is present, it's a superset of KOI8_R -+ try { -+ dbEncoding = "KOI8_U"; -+ "test".getBytes(dbEncoding); -+ } -+ catch(UnsupportedEncodingException uee) { -+ // well, KOI8_U is still not in standard JDK, falling back to KOI8_R :( -+ dbEncoding = "KOI8_R"; -+ } -+ - } else if (dbEncoding.equals("WIN")) { - dbEncoding = "Cp1252"; -+ } else if (dbEncoding.equals("UNKNOWN")) { -+ //This isn't a multibyte database so we don't have an encoding to use -+ //We leave dbEncoding null which will cause the default encoding for the -+ //JVM to be used -+ dbEncoding = null; - } else { - dbEncoding = null; - } diff --git a/databases/postgresql83-server/files/patch-jdbc-build-xml b/databases/postgresql83-server/files/patch-jdbc-build-xml deleted file mode 100644 index b1c703a9c978..000000000000 --- a/databases/postgresql83-server/files/patch-jdbc-build-xml +++ /dev/null @@ -1,10 +0,0 @@ ---- src/interfaces/jdbc/build.xml~ Fri Mar 16 22:50:43 2001 -+++ src/interfaces/jdbc/build.xml Wed Apr 18 08:57:57 2001 -@@ -120,6 +120,7 @@ - <javac srcdir="${src}" destdir="${dest}"> - <include name="example/**" /> - <exclude name="example/corba/**"/> -+ <exclude name="example/blobtest.java" unless="jdk1.2+"/> - </javac> - </target> - diff --git a/databases/postgresql83-server/files/patch-jdbc-getdate b/databases/postgresql83-server/files/patch-jdbc-getdate deleted file mode 100644 index 744407ae14b5..000000000000 --- a/databases/postgresql83-server/files/patch-jdbc-getdate +++ /dev/null @@ -1,34 +0,0 @@ ---- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java~ Fri Feb 23 19:12:23 2001 -+++ src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java Wed May 9 04:31:11 2001 -@@ -423,8 +423,13 @@ - String s = getString(columnIndex); - if(s==null) - return null; -- -- return java.sql.Date.valueOf(s); -+ // length == 10: SQL Date -+ // length > 10: SQL Timestamp, assumes PGDATESTYLE=ISO -+ try { -+ return java.sql.Date.valueOf((s.length() == 10) ? s : s.substring(0,10)); -+ } catch (NumberFormatException e) { -+ throw new PSQLException("postgresql.res.baddate", s); -+ } - } - - /** -@@ -441,8 +446,13 @@ - - if(s==null) - return null; // SQL NULL -- -- return java.sql.Time.valueOf(s); -+ // length == 8: SQL Time -+ // length > 8: SQL Timestamp -+ try { -+ return java.sql.Time.valueOf((s.length() == 8) ? s : s.substring(11,19)); -+ } catch (NumberFormatException e) { -+ throw new PSQLException("postgresql.res.badtime",s); -+ } - } - - /** diff --git a/databases/postgresql83-server/files/patch-src::backend::utils::init::findbe.c b/databases/postgresql83-server/files/patch-src::backend::utils::init::findbe.c new file mode 100644 index 000000000000..e453be9d93da --- /dev/null +++ b/databases/postgresql83-server/files/patch-src::backend::utils::init::findbe.c @@ -0,0 +1,13 @@ +--- src/backend/utils/init/findbe.c.orig Tue Feb 19 16:03:38 2002 ++++ src/backend/utils/init/findbe.c Tue Feb 19 16:03:45 2002 +@@ -13,9 +13,9 @@ + */ + #include "postgres.h" + ++#include <sys/types.h> + #include <grp.h> + #include <pwd.h> +-#include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> + diff --git a/databases/postgresql83-server/files/pkgIndex.tcl.in b/databases/postgresql83-server/files/pkgIndex.tcl.in deleted file mode 100644 index bd8329b15c69..000000000000 --- a/databases/postgresql83-server/files/pkgIndex.tcl.in +++ /dev/null @@ -1,4 +0,0 @@ -# Package-index file for Pgtcl-package. Enables you to load PostgreSQL -# interface functions right into you TCL-interpreter as simply as -# package require Pgtcl -package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql83-server/files/post-install-notes b/databases/postgresql83-server/files/post-install-notes index 9347fc51c247..5480550a1ed4 100644 --- a/databases/postgresql83-server/files/post-install-notes +++ b/databases/postgresql83-server/files/post-install-notes @@ -1,25 +1,49 @@ +The PostgreSQL port has a collection of "side orders": -Now that PostgreSQL is installed, you should read the documentation and -implementation guides. These can be found at: +p5-Pg + A perl5 API for client access to PostgreSQL databases. - http://www.PostgreSQL.org/docs +postgresql-tcltk + If you want tcl/tk client support. You get a neat GUI, pgaccess, as + a bonus! -You may wish to subscribe to the PostgreSQL user-support mailing list. -Send an e-mail to pgsql-questions-request@postgresql.org with the -text "subscribe" in the message body. +postgresql-jdbc + For Java JDBC support. -If you built PostgreSQL with TCL/TK support, you can use the pgaccess -utility to get a TCL/TK based database frontend for database -operations. You do NOT need to install the pgaccess port separately. +postgresql-odbc + For client access from unix applications using ODBC as access + method. Not needed to access unix PostgreSQL servers from Win32 + using ODBC. See below. -If you built in the TCL support, you can load the Pg package into your -TCL scripts as easily as ``package require Pgtcl''. +ruby-postgres, py-PyGreSQL + For client access to PostgreSQL databases using the ruby & python + languages. -If you built with Java support, add -/usr/local/share/java/classes/postgresql.jar to your classpath. +postgresql-plperl, postgresql-pltcl & postgresql-plruby + For using perl5, tcl & ruby as procedural languages. + +etc etc... If you have many tables and many clients running, consider raising kern.maxfiles using sysctl(8). -Use createlang(1) to install languages into your database. -Supported languages are 'plpgsql', 'pltcl', 'pltclu', and 'plperl'. +You should vacuum and backup your database regularly. There is a +periodic script, /usr/local/share/postgresql/502.pgsql, that you may +use. + +To allow many simultaneous connections to your PostgreSQL server, you +should raise the SystemV shared memory limits in your kernel. Here are +example values for allowing up to 180 clients (tinkering in +postgresql.conf also needed, of course): + options SYSVSHM + options SYSVSEM + options SYSVMSG + options SHMMAXPGS=65536 + options SEMMNI=40 + options SEMMNS=240 + options SEMUME=40 + options SEMMNU=120 + +If you plan to access your PostgreSQL server using ODBC, please +consider running the SQL script /usr/local/share/postgresql/odbc.sql +to get the functions required for ODBC compliance. diff --git a/databases/postgresql83-server/files/pre-install-notes b/databases/postgresql83-server/files/pre-install-notes deleted file mode 100644 index 697ce3cedb79..000000000000 --- a/databases/postgresql83-server/files/pre-install-notes +++ /dev/null @@ -1,21 +0,0 @@ - * IMPORTANT UPGRADE NOTICE * IMPORTANT UPGRADE NOTICE * - -The PostgreSQL port now obeys hier(7) by default, which means that it -installs into: - -%%PREFIX%%/bin -%%PREFIX%%/lib -%%PREFIX%%/include/pgsql - -You *must* move away your old installation to avoid problems with -ldconfig(8) and user's PATH:s. If you rather install using the -old-fashion layout, cancel at next screen and run make as: - -$ make -DWITH_OLD_LAYOUT - -As always, you *must* dump existing databases before stopping and -removing your old postgresql, as part of the update. This is *NOT* -done by this port! - -If you want JAVA support, I will try to determine your JAVA_HOME using -javavmwrapper. If you want a different JVM, please set JAVA_HOME. |