head	1.5;
access;
symbols
	pkgsrc-2013Q2:1.5.0.54
	pkgsrc-2013Q2-base:1.5
	pkgsrc-2012Q4:1.5.0.52
	pkgsrc-2012Q4-base:1.5
	pkgsrc-2011Q4:1.5.0.50
	pkgsrc-2011Q4-base:1.5
	pkgsrc-2011Q2:1.5.0.48
	pkgsrc-2011Q2-base:1.5
	pkgsrc-2009Q4:1.5.0.46
	pkgsrc-2009Q4-base:1.5
	pkgsrc-2008Q4:1.5.0.44
	pkgsrc-2008Q4-base:1.5
	pkgsrc-2008Q3:1.5.0.42
	pkgsrc-2008Q3-base:1.5
	cube-native-xorg:1.5.0.40
	cube-native-xorg-base:1.5
	pkgsrc-2008Q2:1.5.0.38
	pkgsrc-2008Q2-base:1.5
	pkgsrc-2008Q1:1.5.0.36
	pkgsrc-2008Q1-base:1.5
	pkgsrc-2007Q4:1.5.0.34
	pkgsrc-2007Q4-base:1.5
	pkgsrc-2007Q3:1.5.0.32
	pkgsrc-2007Q3-base:1.5
	pkgsrc-2007Q2:1.5.0.30
	pkgsrc-2007Q2-base:1.5
	pkgsrc-2007Q1:1.5.0.28
	pkgsrc-2007Q1-base:1.5
	pkgsrc-2006Q4:1.5.0.26
	pkgsrc-2006Q4-base:1.5
	pkgsrc-2006Q3:1.5.0.24
	pkgsrc-2006Q3-base:1.5
	pkgsrc-2006Q2:1.5.0.22
	pkgsrc-2006Q2-base:1.5
	pkgsrc-2006Q1:1.5.0.20
	pkgsrc-2006Q1-base:1.5
	pkgsrc-2005Q4:1.5.0.18
	pkgsrc-2005Q4-base:1.5
	pkgsrc-2005Q3:1.5.0.16
	pkgsrc-2005Q3-base:1.5
	pkgsrc-2005Q2:1.5.0.14
	pkgsrc-2005Q2-base:1.5
	pkgsrc-2005Q1:1.5.0.12
	pkgsrc-2005Q1-base:1.5
	pkgsrc-2004Q4:1.5.0.10
	pkgsrc-2004Q4-base:1.5
	pkgsrc-2004Q3:1.5.0.8
	pkgsrc-2004Q3-base:1.5
	pkgsrc-2004Q2:1.5.0.6
	pkgsrc-2004Q2-base:1.5
	pkgsrc-2004Q1:1.5.0.4
	pkgsrc-2004Q1-base:1.5
	pkgsrc-2003Q4:1.5.0.2
	pkgsrc-2003Q4-base:1.5
	buildlink2-base:1.5
	netbsd-1-5-PATCH001:1.4
	netbsd-1-5-RELEASE:1.1
	netbsd-1-4-PATCH003:1.1;
locks; strict;
comment	@# @;


1.5
date	2001.05.14.14.52.39;	author jlam;	state dead;
branches;
next	1.4;

1.4
date	2001.03.25.11.29.37;	author wennmach;	state Exp;
branches;
next	1.3;

1.3
date	2000.12.11.16.43.12;	author jlam;	state Exp;
branches;
next	1.2;

1.2
date	2000.12.07.16.56.41;	author jlam;	state Exp;
branches;
next	1.1;

1.1
date	2000.03.18.17.43.18;	author jlam;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Update postgresql to 7.1.1  Pkgsrc changes include splitting into:

	postgresql-lib
	postgresql-client
	postgresql-server
	postgresql-doc

with postgresql as a meta-package.  Major changes from version 7.1.1
include:

	Write-ahead Log (WAL) - To maintain database consistency in
case of an operating system crash, previous releases of PostgreSQL
have forced all data modifications to disk before each transaction
commit.  With WAL, only one log file must be flushed to disk, greatly
improving performance.  If you have been using -F in previous releases
to disable disk flushes, you may want to consider discontinuing its
use.

	TOAST - Previous releases had a compiled-in row length limit,
typically 8 - 32 kB.  This limit made storage of long text fields
difficult.  With TOAST, long rows of any length can be stored with
good performance.

	Outer Joins - We now support outer joins.  The UNION/NOT IN
workaround for outer joins is no longer required.  We use the SQL92
outer join syntax.

	Function Manager - The previous C function manager did not
handle NULLs properly, nor did it support 64-bit CPU's (Alpha).  The
new function manager does.  You can continue using your old custom
functions, but you may want to rewrite them in the future to use the
new function manager call interface.

	Complex Queries - A large number of complex queries that were
unsupported in previous releases now work.  Many combinations of
views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited
tables now work properly. Inherited tables are now accessed by
default.  Subqueries in FROM are now supported.

Migration to 7.1.1

   A dump/restore using pg_dump is required for those wishing to migrate
   data from any previous release.
@
text
@#!/bin/sh
#
# $NetBSD: INSTALL,v 1.4 2001/03/25 11:29:37 wennmach Exp $

PKGNAME=$1
STAGE=$2

USER=@@PGUSER@@
GROUP=@@PGGROUP@@
PGHOME=@@PGHOME@@

ADDUSER="@@ADDUSER@@"
ADDGROUP="@@ADDGROUP@@"
CAT="@@CAT@@"
CHGRP="@@CHGRP@@"
CHMOD="@@CHMOD@@"
CHOWN="@@CHOWN@@"
CP="@@CP@@"
GREP="@@GREP@@"
MKDIR="@@MKDIR@@"
RM="@@RM@@"
SU="@@SU@@"
TOUCH="@@TOUCH@@"

case ${STAGE} in
PRE-INSTALL)
	${CAT} << EOF
------------------------------------------------------------
Dump existing databases, before installing new db version !!
------------------------------------------------------------
EOF
	# Group... the default's shipped with NetBSD
	# We need to check that ${GROUP} exists before adding the user.
	# Do it with chgrp to be able to use NIS.
	#
	${TOUCH} "/tmp/grouptest.$$"
	${CHGRP} ${GROUP} "/tmp/grouptest.$$" >/dev/null 2>&1
	if [ $? -eq 0 ]
	then
		echo "Group '${GROUP}' already exists...proceeding."
	else
		echo "Creating '${GROUP}' group..."
		${ADDGROUP} ${GROUP}
		echo "Done."
	fi
	${RM} -f "/tmp/grouptest.$$"

	# Use `finger' to be able to use NIS.
	#
	finger ${USER} 2>&1 | ${GREP} -q "no such user"
	if [ $? -eq 0 ]
	then
		echo "Creating '${USER}' user..."
		${ADDUSER} \
			-c "PostgreSQL database administrator" \
			-d ${PGHOME} \
			-g ${GROUP} \
			-s /bin/sh \
			${USER}
	# "useradd -d" in NetBSD-1.5 creates a home directory and  populates
	# it with dot files regardless if -m was given or not. This behaviour
	# was changed in later versions. We delete the newly created .profile
	# here so that the sample profile.pgsql  gets installed in the
	# POST-INSTALL stage.
		${RM} -f ${PGHOME}/.profile
		echo "Done."
	else
		echo "User '${USER}' already exists...proceeding."
	fi
	${MKDIR} ${PGHOME}
	${CHOWN} -R ${USER}:${GROUP} ${PGHOME}
	;;

POST-INSTALL)
	if [ ! -f ${PGHOME}/.profile ]; then
		${CP} ${PKG_PREFIX}/share/postgresql/profile.pgsql.sample \
			${PGHOME}/.profile
		${CHOWN} ${USER} ${PGHOME}/.profile
		${CHMOD} 644 ${PGHOME}/.profile
	fi
	${CAT} << EOF
------------------------------------------------------------------
Initializing PostgreSQL Databases - this may take a few minutes...
------------------------------------------------------------------
EOF
        echo "${PKG_PREFIX}/bin/initdb --pglib=${PKG_PREFIX}/share/postgresql --pgdata=${PGHOME}/data" | ${SU} -l ${USER}
	;;

*)
	echo "Unexpected argument: ${STAGE}"
	exit 1
	;;
esac
exit 0
@


1.4
log
@Make pgsql's home directory configurable. This is useful e. g. in cases
where ${PREFIX} is mounted read-only etc. Checked with Johnny C. Lam,
who suggested two additional changes.
@
text
@d3 1
a3 1
# $NetBSD: INSTALL,v 1.3 2000/12/11 16:43:12 jlam Exp $
@


1.3
log
@Cosmetic adjustments.
@
text
@d3 1
a3 1
# $NetBSD: INSTALL,v 1.2 2000/12/07 16:56:41 jlam Exp $
d10 1
a24 2
PGHOME=${PKG_PREFIX}/${USER}

d56 10
a65 2
			-b ${PKG_PREFIX} \
			-g ${GROUP} -s /bin/sh ${USER}
d76 3
a78 1
		${CP} ${PGHOME}/.profile.pgsql ${PGHOME}/.profile
@


1.2
log
@PGHOME is a subdir of ${PREFIX}, so pass -b ${PREFIX} to useradd instead
of directly specifying -d ${PGHOME}.  Canonicalize usage of PGHOME while
I'm at it.  Fixes pkg/11660 by Ben Collver <collver@@softhome.net>.
@
text
@d3 1
a3 1
# $NetBSD: INSTALL,v 1.1 2000/03/18 17:43:18 jlam Exp $
d10 14
a23 1
USERDIR=@@USERDIR@@
d28 5
a32 4
	echo ------------------------------------------------------------
	echo Dump existing databases, before installing new db version !!
	echo ------------------------------------------------------------

d35 1
d37 3
a39 1
	if ${USERDIR}/group info -e ${GROUP}
d44 1
a44 1
		${USERDIR}/group add ${GROUP}
d47 1
d49 1
a49 1
	# use finger to be able to use NIS, ...
d51 2
a52 2
	mkdir -p ${PGHOME}
	if finger ${USER} 2>&1 | grep >/dev/null "no such user"
d55 1
a55 1
		${USERDIR}/user add \
d63 2
a64 1
	chown -R ${USER}:${GROUP} ${PGHOME}
d66 1
d69 2
a70 1
		cp ${PGHOME}/.profile.pgsql ${PGHOME}/.profile
d72 6
a77 4
	echo ------------------------------------------------------------------
	echo Initializing PostgreSQL Databases - this may take a few minutes...
	echo ------------------------------------------------------------------
        echo "${PKG_PREFIX}/bin/initdb --pglib=${PKG_PREFIX}/share/postgresql --pgdata=${PGHOME}/data" | su -l ${USER}
d81 1
a81 1
	echo "Unexpected argument: $2"
@


1.1
log
@Change structure of postgresql package.  Shared library build is now
unlibtoolized.  Things now install into ${PREFIX} instead of
${PREFIX}/${PGSQL_USER} to match hier(7) expectations.  The Tcl and Tk
interfaces are now split out into separate packages.

This closes the following PRs: 7384, 8747, 8789, 9272, 9461.
@
text
@d3 1
a3 1
# $NetBSD$
a9 1
PGHOME=@@PGHOME@@
d11 1
d39 1
a39 1
			-d ${PGHOME} \
d56 1
@

