--- postgresql-8.3-8.3.9.orig/postgresql-8.3.9.tar.bz2.cdbs-config_list
+++ postgresql-8.3-8.3.9/postgresql-8.3.9.tar.bz2.cdbs-config_list
@@ -0,0 +1,4 @@
+postgresql-8.3.9/src/tools/msvc/config.pl
+postgresql-8.3.9/doc/src/sgml/config.sgml
+postgresql-8.3.9/config/config.guess
+postgresql-8.3.9/config/config.sub
--- postgresql-8.3-8.3.9.orig/debian/postgresql-client-8.3.postinst
+++ postgresql-8.3-8.3.9/debian/postgresql-client-8.3.postinst
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+VERSION=8.3
+
+. /usr/share/postgresql-common/maintscripts-functions
+
+if [ "$1" = configure ]; then
+    configure_client_version $VERSION "$2"
+fi
+
+#DEBHELPER#
--- postgresql-8.3-8.3.9.orig/debian/postgresql-client-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-client-8.3.install
@@ -0,0 +1,31 @@
+usr/lib/postgresql/8.3/bin/clusterdb
+usr/lib/postgresql/8.3/bin/pg_dumpall
+usr/lib/postgresql/8.3/bin/pg_dump
+usr/lib/postgresql/8.3/bin/createdb
+usr/lib/postgresql/8.3/bin/createlang
+usr/lib/postgresql/8.3/bin/createuser
+usr/lib/postgresql/8.3/bin/dropdb
+usr/lib/postgresql/8.3/bin/droplang
+usr/lib/postgresql/8.3/bin/dropuser
+usr/lib/postgresql/8.3/bin/reindexdb
+usr/lib/postgresql/8.3/bin/pg_restore
+usr/lib/postgresql/8.3/bin/psql
+usr/lib/postgresql/8.3/bin/vacuumdb
+usr/share/postgresql/8.3/man/man1/pg_restore.1
+usr/share/postgresql/8.3/man/man1/psql.1
+usr/share/postgresql/8.3/man/man1/vacuumdb.1
+usr/share/postgresql/8.3/man/man1/clusterdb.1
+usr/share/postgresql/8.3/man/man1/pg_dump.1
+usr/share/postgresql/8.3/man/man1/pg_dumpall.1
+usr/share/postgresql/8.3/man/man1/createdb.1
+usr/share/postgresql/8.3/man/man1/createlang.1
+usr/share/postgresql/8.3/man/man1/createuser.1
+usr/share/postgresql/8.3/man/man1/dropdb.1
+usr/share/postgresql/8.3/man/man1/droplang.1
+usr/share/postgresql/8.3/man/man1/dropuser.1
+usr/share/postgresql/8.3/man/man1/reindexdb.1
+usr/share/postgresql/8.3/man/man7/*7
+usr/share/postgresql/8.3/psqlrc.sample
+usr/share/locale/*/LC_MESSAGES/pg_dump-8.3.mo
+usr/share/locale/*/LC_MESSAGES/psql-8.3.mo
+usr/share/locale/*/LC_MESSAGES/pgscripts-8.3.mo
--- postgresql-8.3-8.3.9.orig/debian/control
+++ postgresql-8.3-8.3.9/debian/control
@@ -0,0 +1,300 @@
+Source: postgresql-8.3
+Section: misc
+Priority: optional
+Maintainer: Martin Pitt <mpitt@debian.org>
+Uploaders: Gerfried Fuchs <rhonda@debian.at>
+Standards-Version: 3.8.0
+XS-Python-Version: current
+Build-Depends: debhelper (>= 5.0.37.2), cdbs (>= 0.4.43), perl (>= 5.8),
+ libperl-dev, tcl8.4-dev, libreadline5-dev (>= 4.2), libssl-dev, 
+ zlib1g-dev | libz-dev, libpam0g-dev | libpam-dev, libxml2-dev, libkrb5-dev,
+ libldap2-dev, libxslt1-dev, libossp-uuid-dev, python-dev,
+ python-central (>= 0.5), gettext, bzip2, lsb-release
+
+Package: libpq-dev
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, libpq5 (= ${binary:Version}), libssl-dev, libkrb5-dev, comerr-dev
+Conflicts: postgresql-dev (<< 7.5)
+Replaces: postgresql-dev
+Suggests: postgresql-doc-8.3
+Description: header files for libpq5 (PostgreSQL library)
+ Header files and static library for compiling C programs to link
+ with the libpq library in order to communicate with a PostgreSQL
+ database backend.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: libpq5
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: PostgreSQL C client library
+ libpq is a C library that enables user programs to communicate with
+ the PostgreSQL database server.  The server can be on another machine
+ and accessed through TCP/IP.  This version of libpq is compatible
+ with servers from PostgreSQL 8.2 or later.
+ .
+ This package contains the run-time library, needed by packages using
+ libpq.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: libecpg6
+Architecture: any
+Section: libs
+Depends:  ${shlibs:Depends}
+Description: run-time library for ECPG programs
+ The libecpg shared library is used by programs built with ECPG
+ (Embedded PostgreSQL for C).
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: libecpg-dev
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, libpq-dev, libecpg-compat3, libpgtypes3
+Conflicts: postgresql-dev, libecpg3-dev
+Description: development files for ECPG (Embedded PostgreSQL for C)
+ This package contains the necessary files to build ECPG (Embedded
+ PostgreSQL for C) programs.  It includes the development libraries
+ and the preprocessor program ecpg.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+ .
+ Install this package if you want to write C programs with SQL statements
+ embedded in them (rather than run by an external process).
+
+Package: libecpg-compat3
+Architecture: any
+Section: libs
+Depends:  ${shlibs:Depends}
+Description: older version of run-time library for ECPG programs
+ The libecpg_compat shared library is used by programs built with ecpg.
+ (Embedded PostgreSQL for C).
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: libpgtypes3
+Architecture: any
+Section: libs
+Depends:  ${shlibs:Depends}
+Description: shared library libpgtypes for PostgreSQL 8.3
+ The libpgtypes shared library is used by programs built with ecpg.
+ (Embedded PostgreSQL for C).
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-8.3
+Architecture: any
+Section: misc
+Depends: ${shlibs:Depends}, postgresql-client-8.3, postgresql-common (>= 79), tzdata, ssl-cert, locales
+Suggests: oidentd | ident-server
+Conflicts: postgresql (<< 7.5)
+Description: object-relational SQL database, version 8.3 server
+ PostgreSQL is a fully featured object-relational database management
+ system.  It supports a large part of the SQL standard and is designed
+ to be extensible by users in many aspects.  Some of the features are:
+ ACID transactions, foreign keys, views, sequences, subqueries,
+ triggers, user-defined types and functions, outer joins, multiversion
+ concurrency control.  Graphical user interfaces and bindings for many
+ programming languages are available as well.
+ .
+ This package provides the database server for PostgreSQL 8.3. Servers
+ for other major release versions can be installed simultaneously and
+ are coordinated by the postgresql-common package. A package providing
+ ident-server is needed if you want to authenticate remote connections
+ with identd.
+
+Package: postgresql-client-8.3
+Architecture: any
+Section: misc
+Depends: ${shlibs:Depends}, postgresql-client-common
+Conflicts: postgresql (<< 7.5)
+Suggests: postgresql-8.3, postgresql-doc-8.3
+Provides: postgresql-client
+Description: front-end programs for PostgreSQL 8.3
+ This package contains client and administrative programs for
+ PostgreSQL: these are the interactive terminal client psql and
+ programs for creating and removing users and databases.
+ .
+ This is the client package for PostgreSQL 8.3. If you install
+ PostgreSQL 8.3 on a standalone machine, you need the server package
+ postgresql-8.3, too. On a network, you can install this package on
+ many client machines, while the server package may be installed on
+ only one machine.
+ .  
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-server-dev-8.3
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, libpq-dev (>= 8.3~beta)
+Conflicts: pgxs, libpq-dev (<< 8.3~beta4-2)
+Replaces: pgxs, libpq-dev (<< 8.3~beta4-2)
+Description: development files for PostgreSQL 8.3 server-side programming
+ Header files for compiling SSI code to link into PostgreSQL's backend; for
+ example, for C functions to be called from SQL.
+ .
+ This package also contains the Makefiles necessary for building add-on 
+ modules of PostgreSQL, which would otherwise have to be built in the
+ PostgreSQL source-code tree.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-doc-8.3
+Architecture: all
+Section: doc
+Conflicts: postgresql-doc (<< 7.5)
+Description: documentation for the PostgreSQL database management system
+ This package contains all README files, user manual, and examples for
+ PostgreSQL 8.3. The manual is in HTML format.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-contrib-8.3
+Architecture: any
+Section: misc
+Depends: postgresql-8.3, ${shlibs:Depends}, postgresql-common (>= 79)
+Suggests: libdbd-pg-perl
+Conflicts: postgresql-contrib (<< 7.5)
+Replaces: postgresql-client-8.3 (<< 8.3~beta1-2)
+Description: additional facilities for PostgreSQL
+ The PostgreSQL contrib package provides several additional features
+ for the PostgreSQL database. This version is built to work with the
+ server package postgresql-8.3.  contrib often serves as a testbed for
+ features before they are adopted into PostgreSQL proper:
+ .
+  adminpack      - File and log manipulation routines, used by pgAdmin
+  btree_gist     - B-Tree indexing using GiST (Generalised Search Tree)
+  chkpass        - An auto-encrypted password datatype
+  cube           - Multidimensional-cube datatype (GiST indexing example)
+  dblink         - Functions to return results from a remote database
+  earthdistance  - Operator for computing the distance (in miles) between
+                   two points on the earth's surface
+  fuzzystrmatch  - Levenshtein, metaphone, and soundex fuzzy string matching
+  hstore         - Store (key, value) pairs
+  intagg         - Integer aggregator/enumerator
+  _int           - Index support for arrays of int4, using GiST (benchmark
+                   needs the libdbd-pg-perl package)
+  isn            - type extensions for ISBN, ISSN, ISMN, EAN13 product numbers
+  lo             - Large Object maintenance
+  ltree          - Tree-like data structures
+  oid2name       - Maps OIDs to table names
+  pageinspect    - Inspection of database pages
+  pg_buffercache - Real time queries on the shared buffer cache
+  pg_freespacemap- Displays the contents of the free space map (FSM)
+  pg_trgm        - Determine the similarity of text based on trigram matching
+  pg_standby     - Create a warm stand-by server
+  pgbench        - TPC-B like benchmark
+  pgcrypto       - Cryptographic functions
+  pgrowlocks     - A function to return row locking information
+  pgstattuple    - Returns the percentage of dead tuples in a table; this
+                   indicates whether a vacuum is required.
+  seg            - Confidence-interval datatype (GiST indexing example)
+  spi            - PostgreSQL Server Programming Interface; 4 examples of
+                   its use:
+                   autoinc    - A function for implementing AUTOINCREMENT/
+                                IDENTITY
+                   insert_username - function for inserting user names
+                   moddatetime - Update modification timestamps
+                   refint     - Functions for implementing referential
+                                integrity (foreign keys).  Note that this is
+                                now superseded by built-in referential
+                                integrity.
+                   timetravel - Re-implements in user code the time travel
+                                feature that was removed in 6.3.
+  tablefunc      - examples of functions returning tables
+  uuid-ossp      - UUID generation functions
+  vacuumlo       - Remove orphaned large objects
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-plperl-8.3
+Architecture: any
+Depends: ${shlibs:Depends}, postgresql-8.3, perl
+Description: PL/Perl procedural language for PostgreSQL 8.3
+ PL/Perl enables an SQL developer to write procedural language functions
+ for PostgreSQL 8.3 in Perl.  You need this package if you have any
+ PostgreSQL 8.3 functions that use the languages plperl or plperlu.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-plpython-8.3
+Architecture: any
+Depends: ${shlibs:Depends}, postgresql-8.3
+XB-Python-Version: ${python:Versions}
+Description: PL/Python procedural language for PostgreSQL 8.3
+ PL/Python enables an SQL developer to write procedural language functions
+ for PostgreSQL 8.3 in Python.  You need this package if you have any
+ PostgreSQL 8.3 functions that use the languages plpython or plpythonu.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-pltcl-8.3
+Architecture: any
+Depends: ${shlibs:Depends}, postgresql-8.3
+Description: PL/Tcl procedural language for PostgreSQL 8.3
+ PL/Tcl enables an SQL developer to write procedural language functions
+ for PostgreSQL 8.3 in Tcl.  You need this package if you have any
+ PostgreSQL 8.3 functions that use the languages pltcl or pltclu.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql
+Architecture: all
+Section: misc
+Depends: postgresql-8.3
+Description: object-relational SQL database (supported version)
+ PostgreSQL is a fully featured object-relational database management
+ system.  It supports a large part of the SQL standard and is designed
+ to be extensible by users in many aspects.  Some of the features are:
+ ACID transactions, foreign keys, views, sequences, subqueries,
+ triggers, user-defined types and functions, outer joins, multiversion
+ concurrency control.  Graphical user interfaces and bindings for many
+ programming languages are available as well.
+ .
+ This package always depends on the currently supported PostgreSQL
+ database server version.
+
+Package: postgresql-client
+Architecture: all
+Section: misc
+Depends: postgresql-client-8.3
+Description: front-end programs for PostgreSQL (supported version)
+ This package contains client and administrative programs for
+ PostgreSQL: these are the interactive terminal client psql and
+ programs for creating and removing users and databases.
+ .
+ This package always depends on the currently supported database
+ client package for PostgreSQL. If you install PostgreSQL on a
+ standalone machine, you need the server package postgresql, too. On a
+ network, you can install this package on many client machines, while
+ the server package may be installed on only one machine.
+ .  
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-doc
+Architecture: all
+Section: doc
+Depends: postgresql-doc-8.3
+Description: documentation for the PostgreSQL database management system
+ This package contains all README files, user manual, and examples for
+ the currently supported PostgreSQL version. The manual is in HTML
+ format.
+ .
+ PostgreSQL is an object-relational SQL database management system.
+
+Package: postgresql-contrib
+Architecture: all
+Section: misc
+Depends: postgresql-contrib-8.3
+Description: additional facilities for PostgreSQL (supported version)
+ The PostgreSQL contrib package provides several additional features
+ for the PostgreSQL database. contrib often serves as a testbed for
+ features before they are adopted into PostgreSQL proper.
+ .
+ This package always depends on the currently supported contrib
+ package for PostgreSQL.
+ .
+ PostgreSQL is an object-relational SQL database management system.
--- postgresql-8.3-8.3.9.orig/debian/rules
+++ postgresql-8.3-8.3.9/debian/rules
@@ -0,0 +1,141 @@
+#!/usr/bin/make	-f 
+TCL_VER := 8.4
+MAJOR_VER := 8.3
+DEB_TAR_SRCDIR:=postgresql-8.3.9
+
+include /usr/share/cdbs/1/rules/tarball.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+LDFLAGS+= -Wl,--as-needed
+CFLAGS+= -fPIC
+
+ifneq ($(findstring $(DEB_BUILD_ARCH), sparc alpha),)
+# sparc and alpha's gcc currently miscompiles; see
+# http://lists.debian.org/debian-alpha/2007/11/msg00025.html
+    CFLAGS+=-O1
+endif
+
+# build should fail on test suite failures on all arches
+TESTSUITE_FAIL_CMD=exit 1
+
+DEB_DH_INSTALL_SOURCEDIR=debian/tmp
+DEB_CONFIGURE_EXTRA_FLAGS := --mandir=\$${prefix}/share/postgresql/$(MAJOR_VER)/man \
+  --with-docdir=\$${prefix}/share/doc/postgresql-doc-$(MAJOR_VER) \
+  --sysconfdir=/etc/postgresql-common \
+  --datadir=\$${prefix}/share/postgresql/$(MAJOR_VER) \
+  --bindir=\$${prefix}/lib/postgresql/$(MAJOR_VER)/bin \
+  --includedir=\$${prefix}/include/postgresql/ \
+  --enable-nls \
+  --enable-integer-datetimes \
+  --enable-thread-safety \
+  --enable-debug \
+  --disable-rpath \
+  --with-tcl \
+  --with-perl \
+  --with-python \
+  --with-pam \
+  --with-krb5 \
+  --with-gssapi \
+  --with-openssl \
+  --with-libxml \
+  --with-libxslt \
+  --with-ldap \
+  --with-ossp-uuid \
+  --with-gnu-ld \
+  --with-tclconfig=/usr/lib/tcl$(TCL_VER) \
+  --with-tkconfig=/usr/lib/tk$(TCL_VER) \
+  --with-includes=/usr/include/tcl$(TCL_VER) \
+  --with-system-tzdata=/usr/share/zoneinfo \
+  --with-pgport=5432 \
+  $(ARCH_OPTS) \
+  CFLAGS='$(CFLAGS)' \
+  LDFLAGS='$(LDFLAGS)'
+
+DEB_DH_MAKESHLIBS_ARGS := -Xusr/lib/postgresql/$(MAJOR_VER)
+DEB_DH_INSTALLCHANGELOGS_ARGS := build-tree/postgresql-*/HISTORY
+DEB_COMPRESS_EXCLUDE := .source .c
+DEB_DH_INSTALLINIT_ARGS := -u'defaults 19 21'
+
+common-binary-predeb-arch::
+	# verify that all files are installed; ignore manpages, since
+	# they are handled by dh_installman
+	missing=`dh_install --sourcedir=debian/tmp --list-missing --no-act 2>&1 | grep -v man/man`; \
+	if [ -n "$$missing" ]; then \
+	    echo "Not all files are installed:"; \
+	    echo "$$missing"; \
+	    exit 1; \
+	fi
+
+common-post-build-arch::
+	# generate POT files for translators
+	find build-tree -name nls.mk -exec sh -c "make -C \$$(dirname {}) init-po" \;
+	
+common-post-build-indep::
+	# build tutorial stuff
+	make -C build-tree/$(DEB_TAR_SRCDIR)/src/tutorial NO_PGXS=1
+
+install/postgresql-doc-$(MAJOR_VER)::
+	install build-tree/$(DEB_TAR_SRCDIR)/src/tutorial/*.c build-tree/$(DEB_TAR_SRCDIR)/src/tutorial/*.source build-tree/$(DEB_TAR_SRCDIR)/src/tutorial/Makefile build-tree/$(DEB_TAR_SRCDIR)/src/tutorial/README debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/tutorial
+
+binary-predeb/postgresql-$(MAJOR_VER)::
+ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+	# patch away the "don't execute as root" check for the test
+	# suite; doing it here will ensure that the actual debs have
+	# the check.
+	set -e; cd build-tree/$(DEB_TAR_SRCDIR); \
+	patch --no-backup-if-mismatch -p1 < ../../debian/disable-root-check.patch; \
+	make -C src/test/regress bigcheck || fail=1; \
+	patch --no-backup-if-mismatch -Rp1 < ../../debian/disable-root-check.patch; \
+	if [ -n "$$fail" ]; then \
+	    for l in regression.diffs log/initdb.log log/postmaster.log; do \
+	    	if [ -e src/test/regress/$$l ]; then \
+		    echo "********* $$l *******"; \
+		    cat src/test/regress/$$l; \
+		fi; \
+	    done; \
+	    $(TESTSUITE_FAIL_CMD); \
+	fi
+endif
+
+	# compress manpages
+	find debian/postgresql-$(MAJOR_VER)/usr/share/postgresql/$(MAJOR_VER)/man -type f -exec gzip -9 '{}' \;
+
+binary-predeb/postgresql-client-$(MAJOR_VER)::
+	find debian/postgresql-client-$(MAJOR_VER)/usr/share/postgresql/$(MAJOR_VER)/man -type f -exec gzip -9 '{}' \;
+
+binary-install/postgresql-plpython-$(MAJOR_VER)::
+	dh_pycentral -p$(cdbs_curpkg)
+	dh_python -p$(cdbs_curpkg) usr/lib/postgresql/$(MAJOR_VER)/lib
+
+# run tests in contrib in temporary test installations, using programs
+# from build-tree
+contrib-check:
+	set -e; cd build-tree/$(DEB_TAR_SRCDIR)/contrib; \
+	for d in *; do \
+	    [ -d $$d/sql ] || continue; \
+	    echo "==============  Running tests in $$d"; \
+	    (cd $$d; \
+	    if ! ../../src/test/regress/pg_regress --top-builddir=../.. --temp-install=$(CURDIR)/build-tree/tmp_check --dbname=contrib_regression `cd sql; ls *.sql | sed 's/.sql$$//'`; then \
+		 cat regression.diffs; \
+	    fi); \
+	done
+
+# run tests in contrib in temporary test installation, using programs
+# from system installation
+contrib-installcheck:
+	# set up temporary db
+	rm -rf build-tree/tmp_data
+	mkdir build-tree/tmp_data
+	/usr/lib/postgresql/$(MAJOR_VER)/bin/initdb -D build-tree/tmp_data
+	/usr/lib/postgresql/$(MAJOR_VER)/bin/pg_ctl -D build-tree/tmp_data -l build-tree/tmp_data/postgres.log -o '-k /tmp' start
+	# wait until it started up
+	while !/usr/lib/postgresql/$(MAJOR_VER)/bin/psql -h /tmp -l >/dev/null 2>&1; do sleep 1; done
+	sleep 1
+	while !/usr/lib/postgresql/$(MAJOR_VER)/bin/psql -h /tmp -l >/dev/null 2>&1; do sleep 1; done
+	# run the tests
+	-cd build-tree/$(DEB_TAR_SRCDIR)/contrib; make installcheck
+	/usr/lib/postgresql/$(MAJOR_VER)/bin/pg_ctl -D build-tree/tmp_data stop
+	# find and print the regression diffs
+	find build-tree/$(DEB_TAR_SRCDIR)/contrib/ -name regression.diffs -exec cat '{}' \;
--- postgresql-8.3-8.3.9.orig/debian/libecpg6.install
+++ postgresql-8.3-8.3.9/debian/libecpg6.install
@@ -0,0 +1 @@
+usr/lib/libecpg.so.6*
--- postgresql-8.3-8.3.9.orig/debian/changelog
+++ postgresql-8.3-8.3.9/debian/changelog
@@ -0,0 +1,1673 @@
+postgresql-8.3 (8.3.9-0lenny1~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch-backports.
+  * Lowered tcl-dev dependency back to 8.4 (also in debian/rules).
+  * Remove hardening-wrapper building which isn't available in etch.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Mon, 04 Jan 2010 22:55:10 +0100
+
+postgresql-8.3 (8.3.9-0lenny1) stable-security; urgency=high
+
+  * New upstream security/bug fix release:
+    - Protect against indirect security threats caused by index functions
+      changing session-local state. This change prevents allegedly-immutable
+      index functions from possibly subverting a superuser's session
+      (CVE-2009-4136).
+    - Reject SSL certificates containing an embedded null byte in the
+      common name (CN) field. This prevents unintended matching of a
+      certificate to a server or client name during SSL validation
+      (CVE-2009-4034).
+    - Fix possible crash during backend-startup-time cache initialization.
+    - Avoid crash on empty thesaurus dictionary.
+    - Prevent signals from interrupting VACUUM at unsafe times.
+    - Fix possible crash due to integer overflow in hash table size
+      calculation.
+    - Fix very rare crash in inet/cidr comparisons.
+    - Ensure that shared tuple-level locks held by prepared transactions
+      are not ignored.
+    - Fix premature drop of temporary files used for a cursor that is
+      accessed within a subtransaction.
+    - Fix memory leak in syslogger process when rotating to a new CSV
+      logfile.
+    - Fix incorrect logic for GiST index page splits, when the split
+      depends on a non-first column of the index.
+    - Don't error out if recycling or removing an old WAL file fails at
+      the end of checkpoint. It's better to treat the problem as non-fatal and
+      allow the checkpoint to complete. Future checkpoints will retry the
+      removal.  Such problems are not expected in normal operation, but have
+      been seen to be caused by misdesigned Windows anti-virus and backup
+      software.
+    - Fix PAM password processing to be more robust.
+    - Raise the maximum authentication token (Kerberos ticket) size in
+      GSSAPI and SSPI authentication methods. While the old 2000-byte limit
+      was more than enough for Unix Kerberos implementations, tickets issued
+      by Windows Domain Controllers can be much larger.
+    - Re-enable collection of access statistics for sequences. This used to
+      work but was broken in 8.3.
+    - Fix processing of ownership dependencies during CREATE OR REPLACE
+      FUNCTION.
+    - Fix incorrect handling of WHERE "x"="x" conditions.
+      In some cases these could get ignored as redundant, but they aren't
+      -- they're equivalent to "x" IS NOT NULL.
+    - Make text search parser accept underscores in XML attributes.
+    - Fix encoding handling in xml binary input. If the XML header doesn't
+      specify an encoding, we now assume UTF-8 by default; the previous
+      handling was inconsistent.
+    - Fix bug with calling plperl from plperlu or vice versa.
+    - Fix session-lifespan memory leak when a PL/Perl function is
+      redefined.
+    - Ensure that Perl arrays are properly converted to PostgreSQL arrays
+      when returned by a set-returning PL/Perl function.
+    - Fix rare crash in exception processing in PL/Python.
+    - Make the postmaster ignore any application_name parameter in
+      connection request packets, to improve compatibility with future
+      libpq versions.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 15 Dec 2009 12:03:15 +0100
+
+postgresql-8.3 (8.3.8-0lenny1) stable-security; urgency=high
+
+  * New upstream security/bug fix release:
+    - Disallow "RESET ROLE" and "RESET SESSION AUTHORIZATION" inside
+      security-definer functions. This covers a case that was missed in the
+      previous patch that disallowed "SET ROLE" and "SET SESSION
+      AUTHORIZATION" inside security-definer functions. [CVE-2007-6600]
+    - Force WAL segment switch during pg_start_backup(). This avoids corner
+      cases that could render a base backup unusable.
+    - Make "LOAD" of an already-loaded loadable module into a no-op.
+      Formerly, "LOAD" would attempt to unload and re-load the module,
+      but this is unsafe and not all that useful.
+    - Disallow empty passwords during LDAP authentication.
+    - Fix handling of sub-SELECTs appearing in the arguments of an
+      outer-level aggregate function.
+    - Fix bugs associated with fetching a whole-row value from the output
+      of a Sort or Materialize plan node.
+    - Prevent synchronize_seqscans from changing the results of
+      scrollable and WITH HOLD cursors.
+    - Revert planner change that disabled partial-index and constraint
+      exclusion optimizations when there were more than 100 clauses in an
+      AND or OR list.
+    - Fix hash calculation for data type interval. This corrects wrong results
+      for hash joins on interval values. It also changes the contents of hash
+      indexes on interval columns. If you have any such indexes, you must
+      "REINDEX" them after updating.
+    - Treat to_char(..., 'TH') as an uppercase ordinal suffix with
+      'HH'/'HH12'. It was previously handled as 'th' (lowercase).
+    - Fix overflow for INTERVAL 'x ms' when "x" is more than 2 million
+      and integer datetimes are in use.
+    - Fix calculation of distance between a point and a line segment.
+      This led to incorrect results from a number of geometric operators.
+    - Fix money data type to work in locales where currency amounts have
+      no fractional digits, e.g. Japan.
+    - Fix LIKE for case where pattern contains %_.
+    - Properly round datetime input like 00:12:57.9999999999999999999999999999.
+    - Fix memory leaks in XML operations.
+    - Fix poor choice of page split point in GiST R-tree operator classes.
+    - Ensure that a "fast shutdown" request will forcibly terminate open
+      sessions, even if a "smart shutdown" was already in progress.
+    - Avoid performance degradation in bulk inserts into GIN indexes when
+      the input values are (nearly) in sorted order.
+    - Correctly enforce NOT NULL domain constraints in some contexts in
+      PL/pgSQL.
+    - Fix portability issues in plperl initialization.
+    - Fix pg_ctl to not go into an infinite loop if "postgresql.conf" is
+      empty.
+    - Improve pg_dump's efficiency when there are many large objects.
+    - Use SIGUSR1, not SIGQUIT, as the failover signal for pg_standby.
+    - Make pg_standby's maxretries option behave as documented.
+    - Make "contrib/hstore" throw an error when a key or value is too
+      long to fit in its data structure, rather than silently truncating
+      it.
+    - Fix "contrib/xml2"'s xslt_process() to properly handle the maximum
+      number of parameters (twenty).
+    - Improve robustness of libpq's code to recover from errors during
+      "COPY FROM STDIN".
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 18 Sep 2009 14:52:26 +0200
+
+postgresql-8.3 (8.3.7-0lenny1) stable; urgency=low
+
+  * New upstream bug fix release:
+     - Prevent error recursion crashes when encoding conversion fails.
+       This change extends fixes made in the last two minor releases for
+       related failure scenarios. The previous fixes were narrowly
+       tailored for the original problem reports, but we have now
+       recognized that *any* error thrown by an encoding conversion
+       function could potentially lead to infinite recursion while trying
+       to report the error. The solution therefore is to disable
+       translation and encoding conversion and report the plain-ASCII form
+       of any error message, if we find we have gotten into a recursive
+       error reporting situation. (Closes: #517405)
+     - Disallow "CREATE CONVERSION" with the wrong encodings for the
+       specified conversion function. This prevents one possible scenario for
+       encoding conversion failure. The previous change is a backstop to guard
+       against other kinds of failures in the same area.
+     - Fix xpath() to not modify the path expression unless necessary, and
+       to make a saner attempt at it when necessary.
+       The SQL standard suggests that xpath should work on data that is a
+       document fragment, but libxml doesn't support that, and indeed it's
+       not clear that this is sensible according to the XPath standard.
+       xpath attempted to work around this mismatch by modifying both the
+       data and the path expression, but the modification was buggy and
+       could cause valid searches to fail. Now, xpath checks whether the
+       data is in fact a well-formed document, and if so invokes libxml
+       with no change to the data or path expression. Otherwise, a
+       different modification method that is somewhat less likely to fail
+       is used.
+       Note: The new modification method is still not 100% satisfactory,
+       and it seems likely that no real solution is possible. This patch
+       should therefore be viewed as a band-aid to keep from breaking
+       existing applications unnecessarily. It is likely that PostgreSQL
+       8.4 will simply reject use of xpath on data that is not a
+       well-formed document.
+     - Fix core dump when to_char() is given format codes that are
+       inappropriate for the type of the data argument.
+     - Fix extreme inefficiency in text search parser's handling of an
+       email-like string containing multiple @ characters.
+     - Fix planner problem with sub-"SELECT" in the output list of a
+       larger subquery.
+     - Fix decompilation of CASE WHEN with an implicit coercion.
+     - Fix possible misassignment of the owner of a TOAST table's rowtype.
+       If "CLUSTER" or a rewriting variant of "ALTER TABLE" were executed
+       by someone other than the table owner, the pg_type entry for the
+       table's TOAST table would end up marked as owned by that someone.
+       This caused no immediate problems, since the permissions on the
+       TOAST rowtype aren't examined by any ordinary database operation.
+       However, it could lead to unexpected failures if one later tried to
+       drop the role that issued the command (in 8.1 or 8.2), or "owner of
+       data type appears to be invalid" warnings from pg_dump after having
+       done so (in 8.3).
+     - Change "UNLISTEN" to exit quickly if the current session has never
+       executed any "LISTEN" command.
+       Most of the time this is not a particularly useful optimization,
+       but since "DISCARD ALL" invokes "UNLISTEN", the previous coding
+       caused a substantial performance problem for applications that made
+       heavy use of "DISCARD ALL".
+     - Fix PL/pgSQL to not treat INTO after "INSERT" as an INTO-variables
+       clause anywhere in the string, not only at the start; in
+       particular, don't fail for "INSERT INTO" within "CREATE RULE".
+     - Clean up PL/pgSQL error status variables fully at block exit.
+       This is not a problem for PL/pgSQL itself, but the omission could
+       cause the PL/pgSQL Debugger to crash while examining the state of a
+       function.
+     - Add MUST (Mauritius Island Summer Time) to the default list of
+       known timezone abbreviations (Xavier Bugaud)
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 14 Mar 2009 19:17:23 +0100
+
+postgresql-8.3 (8.3.6-1) unstable; urgency=low
+
+  * New upstream bug fix release:
+    - Make "DISCARD ALL" release advisory locks, in addition to
+      everything it already did. This was decided to be the most
+      appropriate behavior. This could affect existing applications,
+      however.
+    - Fix whole-index GiST scans to work correctly.  This error could
+      cause rows to be lost if a table is clustered on a GiST index.
+    - Fix crash of xmlconcat(NULL).
+    - Fix possible crash in ispell dictionary if high-bit-set characters
+      are used as flags.  This is known to be done by one widely
+      available Norwegian dictionary, and the same condition may exist
+      in others. (Closes: #513580)
+    - Fix misordering of pg_dump output for composite types.  The most
+      likely problem was for user-defined operator classes to be
+      dumped after indexes or views that needed them.
+    - Improve handling of URLs in headline() function.
+    - Improve handling of overlength headlines in headline() function.
+    - Prevent possible Assert failure or misconversion if an encoding
+      conversion is created with the wrong conversion function for the
+      specified pair of encodings.
+    - Fix possible Assert failure if a statement executed in PL/pgSQL is
+      rewritten into another kind of statement, for example if an
+      "INSERT" is rewritten into an "UPDATE".
+    - Ensure that a snapshot is available to datatype input functions.
+      This primarily affects domains that are declared with CHECK
+      constraints involving user-defined stable or immutable functions.
+      Such functions typically fail if no snapshot has been set.
+    - Make it safer for SPI-using functions to be used within datatype
+      I/O; in particular, to be used in domain check constraints.
+    - Avoid unnecessary locking of small tables in "VACUUM".
+    - Fix a problem that sometimes kept "ALTER TABLE ENABLE/DISABLE RULE"
+      from being recognized by active sessions.
+    - Fix a problem that made UPDATE RETURNING tableoid return zero
+      instead of the correct OID.
+    - Allow functions declared as taking ANYARRAY to work on the
+      pg_statistic columns of that type.
+      This used to work, but was unintentionally broken in 8.3.
+    - Fix planner misestimation of selectivity when transitive equality
+      is applied to an outer-join clause.
+      This could result in bad plans for queries like ... from a left
+      join b on a.a1 = b.b1 where a.a1 = 42 ...
+    - Improve optimizer's handling of long IN lists.  This change
+      avoids wasting large amounts of time on such lists when
+      constraint exclusion is enabled.
+    - Prevent synchronous scan during GIN index build.  Because GIN is
+      optimized for inserting tuples in increasing TID order, choosing
+      to use a synchronous scan could slow the build by a factor of
+      three or more.
+    - Ensure that the contents of a holdable cursor don't depend on the
+      contents of TOAST tables.  Previously, large field values in a
+      cursor result might be represented as TOAST pointers, which
+      would fail if the referenced table got dropped before the cursor
+      is read, or if the large value is deleted and then vacuumed
+      away. This cannot happen with an ordinary cursor, but it could
+      with a cursor that is held past its creating transaction.
+    - Fix memory leak when a set-returning function is terminated without
+      reading its whole result.
+    - Fix encoding conversion problems in XML functions when the database
+      encoding isn't UTF-8.
+    - Fix "contrib/dblink"'s dblink_get_result(text,bool) function.
+    - Fix possible garbage output from "contrib/sslinfo" functions.
+    - Fix incorrect behavior of "contrib/tsearch2" compatibility trigger
+      when it's fired more than once in a command.
+    - Fix possible mis-signaling in autovacuum.
+    - Fix ecpg's handling of varchar structs.
+    - Make all documentation reference pgsql-bugs and/or pgsql-hackers as
+      appropriate, instead of the now-decommissioned pgsql-ports and
+      pgsql-patches mailing lists.
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 06 Feb 2009 23:10:40 +0100
+
+postgresql-8.3 (8.3.5-2) experimental; urgency=low
+
+  * Add 15-dict-fallback-dir.patch: If a tsearch/stem dictionary is
+    not found in sharedir/tsearch_data/ll_cc.{dict,affix}, fall back
+    to sharedir/tsearch_data/system_ll_cc.{dict,affix}, where
+    postgresql-common creates them from system directories. (LP: #301770)
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 06 Dec 2008 11:39:31 -0800
+
+postgresql-8.3 (8.3.5-1) unstable; urgency=low
+
+  * New upstream bug fix release:
+    - Fix GiST index corruption due to marking the wrong index entry
+      "dead" after a deletion. This would result in index searches failing to
+      find rows they should have found.
+    - Fix backend crash when the client encoding cannot represent a
+      localized error message.
+    - Fix possible crash in bytea-to-XML mapping.
+    - Fix possible crash when deeply nested functions are invoked from a
+      trigger.
+    - Improve optimization of "expression" IN ("expression-list") queries.
+    - Fix mis-expansion of rule queries when a sub-SELECT appears in a
+      function call in FROM, a multi-row VALUES list, or a RETURNING list.
+    - Fix Assert failure during rescan of an IS NULL search of a GiST
+      index.
+    - Fix memory leak during rescan of a hashed aggregation plan.
+    - Ensure an error is reported when a newly-defined PL/pgSQL trigger
+      function is invoked as a normal function.
+    - Force a checkpoint before "CREATE DATABASE" starts to copy files.
+      This prevents a possible failure if files had recently been deleted
+      in the source database.
+    - Prevent possible collision of relfilenode numbers when moving a
+      table to another tablespace with "ALTER SET TABLESPACE". The command
+      tried to re-use the existing filename, instead of picking one that is
+      known unused in the destination directory.
+    - Fix incorrect text search headline generation when single query
+      item matches first word of text.
+    - Fix improper display of fractional seconds in interval values when
+      using a non-ISO datestyle.
+    - Make ILIKE compare characters case-insensitively even when they're
+      escaped.
+    - Ensure "DISCARD" is handled properly by statement logging.
+    - Fix incorrect logging of last-completed-transaction time during
+      PITR recovery.
+    - Ensure SPI_getvalue and SPI_getbinval behave correctly when the
+      passed tuple and tuple descriptor have different numbers of columns.
+      This situation is normal when a table has had columns added or
+      removed, but these two functions didn't handle it properly. The
+      only likely consequence is an incorrect error indication.
+    - Mark SessionReplicationRole as PGDLLIMPORT so it can be used by
+      Slony on Windows.
+    - Fix small memory leak when using libpq's gsslib parameter.
+      The space used by the parameter string was not freed at connection
+      close.
+    - Ensure libgssapi is linked into libpq if needed.
+    - Fix ecpg's parsing of "CREATE ROLE".
+    - Fix recent breakage of pg_ctl restart.
+  * 03-gettext-domains.patch: Unfuzz for new upstream version.
+  * Drop -contrib's libdbd-pg-perl to Suggests:, since it is only really
+    needed for bench.pl of the _int module. Changed description to point that
+    out.
+  * debian/control: Add explicit dependency to locales, to ensure that the
+    locales package is configured before postgresql-8.3. Otherwise, the server
+    fails to start up when locales is unpacked while postgresql-8.3 is
+    configured. (LP: #280135)
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 31 Oct 2008 21:43:36 +0100
+
+postgresql-8.3 (8.3.4-2) unstable; urgency=medium
+
+  * Urgency medium due to RC bug fix (breaks upgrades).
+  * Add dependency to ssl-cert. This has always been implicitly there through
+    postgresql-common, but when upgrading -8.3 and ssl-cert at the same time,
+    apt does not ensure to configure ssl-cert before postgresql-8.3 if there
+    is no direct dependency. (Closes: #501690)
+  * debian/rules: Enable hardening when we build on Ubuntu. Lenny is too close
+    to release, so we do not enable that yet for Debian. Add hardening-wrapper
+    and lsb-release build dependencies for this.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 11 Oct 2008 14:28:34 +0200
+
+postgresql-8.3 (8.3.4-1) unstable; urgency=low
+
+  * New upstream bugfix release:
+    - Fix bug in btree WAL recovery code. Recovery failed if the WAL ended
+      partway through a page split operation.
+    - Fix potential use of wrong cutoff XID for HOT page pruning.
+      This error created a risk of corruption in system catalogs that are
+      consulted by "VACUUM": dead tuple versions might be removed too
+      soon. The impact of this on actual database operations would be
+      minimal, since the system doesn't follow MVCC rules while examining
+      catalogs, but it might result in transiently wrong output from
+      pg_dump or other client programs.
+    - Fix potential miscalculation of datfrozenxid.
+    - Fix incorrect HOT updates after pg_class is reindexed.
+      Corruption of pg_class could occur if REINDEX TABLE pg_class was
+      followed in the same session by an ALTER TABLE RENAME or ALTER
+      TABLE SET SCHEMA command.
+    - Fix missed "combo cid" case. This error made rows incorrectly invisible
+      to a transaction in which they had been deleted by multiple
+      subtransactions that all aborted.
+    - Prevent autovacuum from crashing if the table it's currently
+      checking is deleted at just the wrong time.
+    - Widen local lock counters from 32 to 64 bits. This responds to reports
+      that the counters could overflow in sufficiently long transactions,
+      leading to unexpected "lock is already held" errors.
+    - Fix possible duplicate output of tuples during a GiST index scan.
+    - Regenerate foreign key checking queries from scratch when either
+      table is modified. Previously, 8.3 would attempt to replan the query,
+      but would work from previously generated query text. This led to
+      failures if a table or column was renamed.
+    - Fix missed permissions checks when a view contains a simple UNION
+      ALL construct. Permissions for the referenced tables were checked
+      properly, but not permissions for the view itself.
+    - Add checks in executor startup to ensure that the tuples produced
+      by an "INSERT" or "UPDATE" will match the target table's current
+      rowtype. This situation is believed to be impossible in 8.3, but it can
+      happen in prior releases, so a check seems prudent.
+    - Fix possible repeated drops during "DROP OWNED". This would typically
+      result in strange errors such as "cache lookup failed for relation NNN".
+    - Fix several memory leaks in XML operations.
+    - Fix xmlserialize() to raise error properly for unacceptable target
+      data type.
+    - Fix a couple of places that mis-handled multibyte characters in
+      text search configuration file parsing. Certain characters occurring in
+      configuration files would always cause "invalid byte sequence for
+      encoding" failures.
+    - Provide file name and line number location for all errors reported
+      in text search configuration files.
+    - Fix AT TIME ZONE to first try to interpret its timezone argument as
+      a timezone abbreviation, and only try it as a full timezone name if
+      that fails, rather than the other way around as formerly.
+    - Fix datetime input functions to correctly detect integer overflow
+      when running on a 64-bit platform.
+    - Prevent integer overflows during units conversion when displaying a
+      configuration parameter that has units.
+    - Improve performance of writing very long log messages to syslog.
+    - Allow spaces in the suffix part of an LDAP URL in "pg_hba.conf".
+    - Fix bug in backwards scanning of a cursor on a SELECT DISTINCT ON
+      query.
+    - Fix planner bug that could improperly push down IS NULL tests below
+      an outer join.
+    - Fix planner bug with nested sub-select expressions.
+    - Fix planner to estimate that GROUP BY expressions yielding boolean
+      results always result in two groups, regardless of the expressions'
+      contents.
+    - Fix PL/PgSQL to not fail when a FOR loop's target variable is a
+      record containing composite-type fields.
+    - Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
+      about the encoding of data sent to or from Tcl.
+    - Improve performance of PQescapeBytea().
+    - Fix ecpg to handle variables properly in "SET" commands.
+    - Improve pg_dump and pg_restore's error reporting after failure to
+      send a SQL command.
+    - Fix pg_ctl to properly preserve postmaster command-line arguments
+      across a restart.
+    - Fix erroneous WAL file cutoff point calculation in pg_standby.
+  * debian/control: Bump Standards-Version (no changes necessary).
+  * debian/control: intarray contrib module was renamed to _int. (LP: #250483)
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 23 Sep 2008 21:29:11 +0200
+
+postgresql-8.3 (8.3.3-1) unstable; urgency=low
+
+  * New upstream bugfix release (note that 8.3.2 was never officially released
+    due to the discovery of another major bug):
+    - Make pg_get_ruledef() parenthesize negative constants.
+      Before this fix, a negative constant in a view or rule might be
+      dumped as, say, -42::integer, which is subtly incorrect: it should
+      be (-42)::integer due to operator precedence rules. Usually this
+      would make little difference, but it could interact with another
+      recent patch to cause PostgreSQL to reject what had been a valid
+      "SELECT DISTINCT" view query. Since this could result in pg_dump
+      output failing to reload, it is being treated as a high-priority
+      fix. The only released versions in which dump output is actually
+      incorrect are 8.3.1 and 8.2.7.
+    - Make "ALTER AGGREGATE ... OWNER TO" update pg_shdepend.
+      This oversight could lead to problems if the aggregate was later
+      involved in a "DROP OWNED" or "REASSIGN OWNED" operation.
+    - Fix incorrect archive truncation point calculation for the %r macro
+      in recovery_command parameters. This could lead to data loss if a
+      warm-standby script relied on %r to decide when to throw away WAL
+      segment files.
+    - Fix "ALTER TABLE ADD COLUMN ... PRIMARY KEY" so that the new column
+      is correctly checked to see if it's been initialized to all
+      non-nulls.
+    - Fix "REASSIGN OWNED" so that it works on procedural languages too.
+    - Fix problems with "SELECT FOR UPDATE/SHARE" occurring as a subquery
+      in a query with a non-"SELECT" top-level operation.
+    - Fix possible "CREATE TABLE" failure when inheriting the "same"
+      constraint from multiple parent relations that inherited that
+      constraint from a common ancestor.
+    - Fix pg_get_ruledef() to show the alias, if any, attached to the
+      target table of an "UPDATE" or "DELETE".
+    - Restore the pre-8.3 behavior that an out-of-range block number in a
+      TID being used in a TidScan plan results in silently not matching
+      any rows. 8.3.0 and 8.3.1 threw an error instead.
+    - Fix GIN bug that could result in a too many LWLocks taken failure.
+    - Fix broken GiST comparison function for tsquery.
+    - Fix tsvector_update_trigger() and ts_stat() to accept domains over
+      the types they expect to work with.
+    - Fix failure to support enum data types as foreign keys.
+    - Avoid possible crash when decompressing corrupted data.
+    - Fix race conditions between delayed unlinks and "DROP DATABASE".
+      In the worst case this could result in deleting a newly created
+      table in a new database that happened to get the same OID as the
+      recently-dropped one; but of course that is an extremely
+      low-probability scenario.
+    - Repair two places where SIGTERM exit of a backend could leave
+      corrupted state in shared memory.
+    - Fix possible crash due to incorrect plan generated for an x IN
+      (SELECT y FROM ...) clause when "x" and "y" have different data
+      types; and make sure the behavior is semantically correct when the
+      conversion from "y"'s type to "x"'s type is lossy.
+    - Fix oversight that prevented the planner from substituting known
+      Param values as if they were constants.
+    - Fix planner failure when an indexable MIN or MAX aggregate is used
+      with DISTINCT or ORDER BY.
+    - Fix planner to ensure it never uses a "physical tlist" for a plan
+      node that is feeding a Sort node.
+    - Avoid unnecessary copying of query strings.
+    - Make TransactionIdIsCurrentTransactionId() use binary search
+      instead of linear search when checking child-transaction XIDs.
+      This fixes some cases in which 8.3.0 was significantly slower than
+      earlier releases.
+    - Fix conversions between ISO-8859-5 and other encodings to handle
+      Cyrillic "Yo" characters (e and E with two dots).
+    - Fix several datatype input functions, notably array_in(), that were
+      allowing unused bytes in their results to contain uninitialized,
+      unpredictable values. This could lead to failures in which two
+      apparently identical literal values were not seen as equal, resulting in
+      the parser complaining about unmatched ORDER BY and DISTINCT
+      expressions.
+    - Fix a corner case in regular-expression substring matching
+      (substring(string from pattern)).
+      The problem occurs when there is a match to the pattern overall but
+      the user has specified a parenthesized subexpression and that
+      subexpression hasn't got a match. An example is substring('foo'
+      from 'foo(bar)?'). This should return NULL, since (bar) isn't
+      matched, but it was mistakenly returning the whole-pattern match
+      instead (ie, foo).
+    - Prevent cancellation of an auto-vacuum that was launched to prevent
+      XID wraparound.
+    - Improve "ANALYZE"'s handling of in-doubt tuples (those inserted or
+      deleted by a not-yet-committed transaction) so that the counts it
+      reports to the stats collector are more likely to be correct.
+    - Fix initdb to reject a relative path for its --xlogdir (-X) option.
+    - Make psql print tab characters as an appropriate number of spaces,
+      rather than \x09 as was done in 8.3.0 and 8.3.1.
+    - Add ECPGget_PGconn() function to ecpglib. Dropped
+      00upstream-ecpg-get-connection.patch, which backported this fix.
+    - Fix incorrect result from ecpg's PGTYPEStimestamp_sub() function.
+    - Fix handling of continuation line markers in ecpg.
+    - Fix possible crashes in "contrib/cube" functions.
+    - Fix core dump in "contrib/xml2"'s xpath_table() function when the
+      input query returns a NULL value.
+  * Build against tcl 8.5.
+  * debian/control: Fix bad wrapping in build dependencies.
+
+ -- Martin Pitt <mpitt@debian.org>  Wed, 11 Jun 2008 20:43:07 +0200
+
+postgresql-8.3 (8.3.1-2) unstable; urgency=low
+
+  * debian/control: Change description of the metapackages from "latest
+    available" to "currently supported", since after a distro release, the
+    latest available upstream version changes, and thus this becomes slightly
+    confusing.
+  * debian/control: Add missing description of 'hstore' to p-contrib.
+  * debian/control: Wrap build dependencies.
+  * Add debian/patches/00upstream-ecpg-get-connection.patch: Backport change
+    from upcoming 8.3.2 to add definition for ECPGget_PGconn().
+    (Closes: #475184)
+  * debian/postgresql-doc-8.3.doc-base: Update section, use "Data management"
+    now.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 22 Apr 2008 19:20:44 +0200
+
+postgresql-8.3 (8.3.1-1) unstable; urgency=low
+
+  * New upstream bugfix release:
+    - Repair corner-case bugs in "VACUUM FULL".
+    - Fix misbehavior of foreign key checks involving character or bit
+      columns.
+    - Avoid needless deadlock failures in no-op foreign-key checks.
+    - Fix possible core dump when re-planning a prepared query.
+    - Fix possible failure when re-planning a query that calls an
+      SPI-using function.
+    - Fix failure in row-wise comparisons involving columns of different
+      datatypes.
+    - Fix longstanding "LISTEN"/"NOTIFY" race condition.
+    - Disallow "LISTEN" and "UNLISTEN" within a prepared transaction
+      This was formerly allowed but trying to do it had various
+      unpleasant consequences, notably that the originating backend could
+      not exit as long as an "UNLISTEN" remained uncommitted.
+    - Disallow dropping a temporary table within a prepared transaction
+      This was correctly disallowed by 8.1, but the check was
+      inadvertently broken in 8.2 and 8.3.
+    - Fix rare crash when an error occurs during a query using a hash
+      index.
+    - Fix incorrect comparison of tsquery values.
+    - Fix incorrect behavior of LIKE with non-ASCII characters in
+      single-byte encodings. (Closes: #469180)
+    - Disable xmlvalidate. This function should have been removed before 8.3
+      release, but was inadvertently left in the source code. It poses a small
+      security risk since unprivileged users could use it to read the first
+      few characters of any file accessible to the server.
+    - Fix memory leaks in certain usages of set-returning functions.
+    - Make encode(bytea, 'escape') convert all high-bit-set byte values
+      into \"nnn" octal escape sequences.
+      This is necessary to avoid encoding problems when the database
+      encoding is multi-byte. This change could pose compatibility issues
+      for applications that are expecting specific results from encode.
+    - Fix input of datetime values for February 29 in years BC.
+      The former coding was mistaken about which years were leap years.
+    . Fix "unrecognized node type" error in some variants of "ALTER
+      OWNER".
+    - Avoid tablespace permissions errors in "CREATE TABLE LIKE INCLUDING
+      INDEXES".
+    - Ensure pg_stat_activity.waiting flag is cleared when a lock wait is
+      aborted.
+    - Fix ecpg problems with arrays.
+    - Fix pg_ctl to correctly extract the postmaster's port number from
+      command-line options. Previously, pg_ctl start -w could try to contact
+      the postmaster on the wrong port, leading to bogus reports of startup
+      failure. (Closes: #358546)
+    - Use "-fwrapv" to defend against possible misoptimization in recent
+      gcc versions (4.3 and later).
+  * debian/postgresql-8.3.init:
+    - Remove erroneous 'S' from Should-Stop.
+    - Require $remote_fs for startup, since postgresql needs /usr.
+    - Thanks to Petter Reinholdtsen!
+    - (Closes: #470935)
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 15 Mar 2008 18:39:36 +0100
+
+postgresql-8.3 (8.3.0-1) unstable; urgency=low
+
+  * Final 8.3.0 release. (Closes: #462070)
+  * debian/watch: Update for a currently working mirror. (Closes: #462821)
+  * Add debian/patches/14-pg_config-paths.patch: Disable PostgreSQL's
+    automagic path mangling and fix libdir for pg_config, so that pg_config in
+    /usr/bin and /usr/lib/postgresql/8.3/bin behave identically.
+    (Closes: #462037)
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 03 Feb 2008 12:14:56 +0100
+
+postgresql-8.3 (8.3~rc2-1) unstable; urgency=low
+
+  * Second release candidate of PostgreSQL 8.3. Upload to unstable now, the
+    database format is not likely to change any more, and we want more
+    widespread testing now.
+  * debian/control: Build the versionless metapackages from this source now
+    and let them point to 8.3.
+  * debian/postgresql-server-dev-8.3.install: Do not ship pg_config.1, it's
+    already shipped by libpq-dev. (Closes: #459746)
+  * debian/rules: Stop postgresql at priority 21, not 19, so that services at
+    runlevel 20 which use postgresql (such as postfix, pdns) can shutdown
+    cleanly. Do the transition on upgrades, too
+    (debian/postgresql-8.3.postinst). (Closes: #447063)
+  * debian/rules: set SYSCONFDIR to /etc/postgresql-common, so that
+    pg_service.conf is searched there. (Closes: #439026)
+  * Add debian/patches/13-pg_service.conf_directory_doc.patch: Change
+    documentation comment in sample pg_service.conf to point to Debian's
+    sysconfdir (/etc/postgresql-common) instead of /usr/local/pgsql/etc.
+  * Fix dependencies of libecpg-dev.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 20 Jan 2008 11:03:23 +0100
+
+postgresql-8.3 (8.3~rc1-1) experimental; urgency=low
+
+  * First release candidate of PostgreSQL 8.3. This also provides the security
+    bug fixes of 8.2.6:
+    - Prevent functions in indexes from executing with the privileges of
+      the user running "VACUUM", "ANALYZE", etc. "SET ROLE" is now forbidden
+      within a SECURITY DEFINER context. [CVE-2007-6600]
+    - Suitably crafted regular-expression patterns could cause crashes,
+      infinite or near-infinite looping, and/or massive memory
+      consumption, all of which pose denial-of-service hazards for
+      applications that accept regex search patterns from untrustworthy
+      sources. [CVE-2007-4769, CVE-2007-4772, CVE-2007-6067]
+    - Require non-superusers who use "/contrib/dblink" to use only
+      password authentication, as a security measure.
+      The fix that appeared for this in 8.2.5 was incomplete, as it
+      plugged the hole for only some "dblink" functions. [CVE-2007-6601,
+      CVE-2007-3278]
+  * debian/patches/04-psql-passwordprompt.patch: Update for new version.
+  * Bump Standards-Version to 3.7.3 (no changes necessary).
+  * debian/rules:
+    - Build with -O1 on sparc and alpha until the miscompilation with -O2 is
+      sorted out (http://lists.debian.org/debian-alpha/2007/11/msg00025.html).
+    - Have a failed test suite fail the build on all architectures again.
+  * Ship pg_config in postgresql-server-dev, and ship a copy in /usr/bin in
+    libpq-dev, instead of libpq-dev shipping it in
+    /usr/lib/postgresql/<version>/bin. This makes it possible to use a
+    libpq-dev from a different major version. (See #455509)
+  * debian/control: Mention tablefunc in -contrib description.
+    (Closes: #458752)
+  * debian/rules: Run make bigcheck instead of check, to run the numeric_big
+    test, too.
+  * debian/rules: Add target 'contrib-check' for running the tests in contrib.
+    Do not call it by default for now, still needs some work.
+  * debian/rules: Add target 'contrib-installcheck' for running the tests in
+    contrib, using the installed programs in the system.
+  * debian/rules: Replace hardcoded '8.3' strings with $(MAJOR_VER) variable.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 05 Jan 2008 19:19:46 +0100
+
+postgresql-8.3 (8.3~beta4-1) experimental; urgency=low
+
+  * Fourth beta release of PostgreSQL 8.3.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 03 Dec 2007 08:35:34 +0100
+
+postgresql-8.3 (8.3~beta3-2) experimental; urgency=low
+
+  * debian/control: Drop libgssapi-dev build dependency, current krb does not
+    need it any more. (Closes: #452549)
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 23 Nov 2007 17:26:12 +0100
+
+postgresql-8.3 (8.3~beta3-1) experimental; urgency=low
+
+  * Third beta release of PostgreSQL 8.3.
+  * debian/rules:
+    - Ignore test suite failure on alpha for now, since it behaves weird on
+      some floating point operations (regression in glibc and gcc-4.2). Bug is
+      under investigation. Fixes FTBFS for now. (see #449002)
+    - Remove test suite ignoring for mips and mipsel again, seems the buildds
+      finally got a fixed kernel.
+  * Add debian/patches/12-psql-sensible-editor.patch: Use sensible-editor
+    instead of vi as editor fallback in psql if $EDITOR and friends are not
+    defined. (Closes: #451553)
+  * Enable OSSP UUID support, add build dependency libossp-uuid-dev.
+    (Closes: #451336)
+  * Install some missing .so libraries.
+  * debian/rules: Check that all files in debian/tmp get installed to
+    somewhere, and fail the build if not.
+
+ -- Martin Pitt <mpitt@debian.org>  Wed, 21 Nov 2007 20:18:44 +0100
+
+postgresql-8.3 (8.3~beta2-1) experimental; urgency=low
+
+  * Second beta release of PostgreSQL 8.3.
+  * Remove patches which are upstream now:
+    00upstream-encoding-abibreakage.patch, 12-pgpassfile-crash.patch
+  * 03-gettext-domains.patch: Adapt to new upstream version.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 28 Oct 2007 12:37:43 -0400
+
+postgresql-8.3 (8.3~beta1-2) experimental; urgency=low
+
+  * debian/control: Update -contrib description for new modules.
+  * debian/{control,rules}: Enable GSSAPI and LDAP support and add build
+    dependencies libgssapi-dev and libldap2-dev.
+  * Add debian/patches/00upstream-encoding-abibreakage.patch: Fix libpq ABI
+    breakage wrt. ordering of encoding names. Taken from upstream CVS head.
+    This requires a catalog bump, thus upgrades from 8.3~beta1-1 will break.
+  * debian/postgresql-8.3.postrm:
+    - Clean up rotated logs on purge when postgresql-common is already gone.
+      (Closes: #447445)
+    - Clean up default data dir/log file if 'pgdata'/'log' symbolic links do
+      not exist.
+    - Clean up environment file.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 14 Oct 2007 13:30:32 +0200
+
+postgresql-8.3 (8.3~beta1-1) experimental; urgency=low
+
+  * First beta release of PostgreSQL 8.3. Branch off the 8.2 packaging.
+  * Drop debian/patches/12-m32r-tas.patch: Adopted upstream.
+  * Drop debian/patches/04-timezone-symlinks.patch: Upstream now offers
+    configure option --with-system-tzdata. Use it in debian/rules.
+  * Drop debian/patches/50-contrib-enablemodules.patch: xml2 is now built
+    conditionally. Supply --with-lib{xml,xslt} configure options in
+    debian/rules.
+  * Updated patches for new upstream version.
+  * debian/control: Bump postgresql-common dependencies to >= 79 to ensure
+    support of version 8.3.
+  * debian/control: Do not build the versionless metapackages like
+    'postgresql' until 8.3 is released and goes to unstable. Until then, 8.2
+    should remain the default.
+  * Add debian/patches/04-psql-passwordprompt.patch: Change psql to not prompt
+    for a password if PGPASSWORD is given, just as in earlier versions.
+    Without that, there is no way to suppress the password input prompt, which
+    is bad for scripts.
+  * Add debian/patches/12-pgpassfile-crash.patch: Fix crash (free'ing a static
+    stack variable) in fe-connect.c.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 09 Oct 2007 16:28:51 +0200
+
+postgresql-8.2 (8.2.5-1) unstable; urgency=low
+
+  * New upstream bugfix release:
+    - Require non-superusers who use "/contrib/dblink" to use only
+      password authentication, as a security measure.
+      [CVE-2007-3278, CVE-2007-3280]
+    - Fix ALTER DOMAIN ADD CONSTRAINT for cases involving domains over
+      domains.
+    - Make "CREATE DOMAIN ... DEFAULT NULL" work properly.
+    - Fix some planner problems with outer joins, notably poor size
+      estimation for t1 LEFT JOIN t2 WHERE t2.col IS NULL.
+    - Allow the interval data type to accept input consisting only of
+      milliseconds or microseconds.
+    - Allow timezone name to appear before the year in timestamp input.
+    - Fixes for GIN indexes used by "/contrib/tsearch2".
+    - Speed up rtree index insertion.
+    - Fix excessive logging of SSL error messages.
+    - Fix logging so that log messages are never interleaved when using
+      the syslogger process.
+    - Fix crash when log_min_error_statement logging runs out of memory.
+    - Fix incorrect handling of some foreign-key corner cases.
+    - Fix stddev_pop(numeric) and var_pop(numeric).
+    - Prevent "REINDEX" and "CLUSTER" from failing due to attempting to
+      process temporary tables of other sessions.
+    - Restrict "/contrib/pgstattuple" functions to superusers, for
+      security reasons.
+    - Do not let "/contrib/intarray" try to make its GIN opclass the
+      default (this caused problems at dump/restore).
+  * Remove debian/patches/00upstream-01-polymorphic-functions.patch: Upstream
+    now.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 16 Sep 2007 12:25:19 +0200
+
+postgresql-8.2 (8.2.4-3) unstable; urgency=medium
+
+  * Urgency medium since the dpkg bug above is nasty and I want this fixed in
+    testing ASAP.
+  * debian/postgresql-8.2.postinst: Work around dpkg bug #435938 by manually
+    doing the timezone symlink transition. Closes: #430524
+  * debian/rules: Make binary-arch idempotent if test suite fails.
+    Closes: #431565
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 04 Aug 2007 14:07:00 +0200
+
+postgresql-8.2 (8.2.4-2) unstable; urgency=low
+
+  * debian/control: Remove some unnecessary build depends. Closes: #424010
+  * debian/postgresql-8.2.install: Actually install the "timezone" symlink,
+    not the dereferenced files.
+  * Add debian/patches/12-m32r-tas.patch:
+    - Support m32r architecture, thanks to Kazuhiro Inaoka for the initial
+      patch.
+    - Backported from CVS head:
+      http://archives.postgresql.org/pgsql-committers/2007-05/msg00065.php
+    - Closes: #419267
+  * Add debian/patches/00upstream-01-polymorphic-functions.patch:
+    - Fix breakage of polymorphic SQL functions (regression in 8.2.4), add
+      test cases.
+    - Patch taken from upstream CVS:
+      http://archives.postgresql.org/pgsql-committers/2007-05/msg00010.php
+    - Closes: #430347
+  * debian/control: Fix libpq-dev Depends: line: ${Source-Version} ->
+    ${binary:Version}.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 23 Jun 2007 19:08:25 +0200
+
+postgresql-8.2 (8.2.4-1) unstable; urgency=medium
+
+  * New upstream security/bug fix release:
+    - Support explicit placement of the temporary-table schema within
+      search_path, and disable searching it for functions and operators.
+      This is needed to allow a security-definer function to set a truly
+      secure value of search_path. Without it, an unprivileged SQL user
+      can use temporary objects to execute code with the privileges of
+      the security-definer function (CVE-2007-2138). See "CREATE
+      FUNCTION" for more information.
+    - Fix to_char() so it properly upper/lower cases localized day or
+      month names.
+    - "/contrib/tsearch2" crash fixes.
+    - Require "COMMIT PREPARED" to be executed in the same database as
+      the transaction was prepared in.
+    - New traditional (Taiwan) Chinese FAQ.
+    - Prevent the statistics collector from writing to disk too
+      frequently.
+    - Fix potential-data-corruption bug in how "VACUUM FULL" handles
+      "UPDATE" chains.
+    - Fix bug in domains that use array types.
+    - Fix "pg_dump" so it can dump a serial column's sequence using "-t"
+      when not also dumping the owning table.
+    - Planner fixes, including improving outer join and bitmap scan
+      selection logic.
+    - Fix possible wrong answers or crash when a PL/pgSQL function tries
+      to RETURN from within an EXCEPTION block.
+    - Fix PANIC during enlargement of a hash index.
+  * debian/patches/04-timezone-symlinks.patch: Adapt to slightly changed
+    Makefile of 8.2.4.
+  * Remove debian/patches/12-vacuum-cycle-hang.patch: Fixed upstream.
+  * debian/postgresql-8.2.postrm: Fix bashism.
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 20 Apr 2007 09:23:55 +0200
+
+postgresql-8.2 (8.2.3-5) unstable; urgency=low
+
+  * debian/rules: Do not let failed test suite fail the build on mips and
+    mipsel. The Debian buildds' kernels are still broken.
+  * debian/control: Add empty postgresql{,-client,-contrib,-doc} packages
+    which always point to the latest available version.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 14 Apr 2007 21:23:32 +0200
+
+postgresql-8.2 (8.2.3-4) unstable; urgency=low
+
+  * First upload to unstable: Welcome, Lenny!
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 14 Apr 2007 13:52:28 +0200
+
+postgresql-8.2 (8.2.3-3) experimental; urgency=low
+
+  * debian/rules: Do not FTBFS on failed test suite on sparc. sparc throws a
+    'floating point exception' instead of a 'division by zero' error, which is
+    fine, but differs from expected string output. Closes: #417160
+
+ -- Martin Pitt <mpitt@debian.org>  Wed,  4 Apr 2007 12:09:37 +0200
+
+postgresql-8.2 (8.2.3-2) experimental; urgency=low
+
+  * debian/control: Add Perl dependency to p-8.2-plperl, to ensure that
+    creating plperl functions works (as opposed to plperlu, which only needs
+    libperl). (see bug #412135)
+  * debian/control: Do not mention nor suggest 'pgdocs' any more in p-doc's
+    description since pgdocs is only available for 7.4. (see bug #405097)
+  * debian/patches/04-timezone-symlinks.patch:
+    - Use the timezone database from the system tzdata instead of shipping our
+      own. Towards a single authoritative time zone database in Debian and
+      Ubuntu... :) (LP: #41159)
+    - Drop previous hardlink-to-symlink patch to zic, since that is irrelevant
+      now.
+    - debian/control: Add tzdata dependency.
+  * Add debian/patches/12-vacuum-cycle-hang.patch: Properly release our
+    semaphore lock before erroring out wit elog() to prevent deadlocks on
+    vacuum errors. Thanks to Heikki Linnakangas!
+  * debian/rules: Have a test suite failure fail the build again. Let's ignore
+    the old kernels on the Debian mips[el] buildds for now.
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 30 Mar 2007 19:02:04 +0200
+
+postgresql-8.2 (8.2.3-1) experimental; urgency=low
+
+  * New upstream bug fix release to fix regressions in 8.2.2:
+    - Remove overly-restrictive check for type length in constraints and
+      functional indexes.
+    - Fix optimization so MIN/MAX in subqueries can again use indexes.
+
+ -- Martin Pitt <mpitt@debian.org>  Thu,  8 Feb 2007 17:13:08 +0100
+
+postgresql-8.2 (8.2.2-1) experimental; urgency=low
+
+  * New upstream security and bug fix release:
+    - Fix security vulnerabilities that allowed connected users to
+      read backend memory.
+      The vulnerabilities involve suppressing the normal check that a SQL
+      function returns the data type it's declared to, and changing the
+      data type of a table column (CVE-2007-0555, CVE-2007-0556). These
+      errors can easily be exploited to cause a backend crash, and in
+      principle might be used to read database content that the user
+      should not be able to access.
+    - Fix not-so-rare-anymore bug wherein btree index page splits could
+      fail due to choosing an infeasible split point.
+    - Properly handle to_char('CC') for years ending in 00.
+      Year 2000 is in the twentieth century, not the twenty-first.
+    - "/contrib/tsearch2" localization improvements.
+    - Fix incorrect permission check in information_schema.key_column_usage
+      view.
+      The symptom is "relation with OID nnnnn does not exist" errors. To
+      get this fix without using "initdb", use "CREATE OR REPLACE VIEW"
+      to install the corrected definition found in
+      "share/information_schema.sql". Note you will need to do this in
+      each database.
+    - Improve "VACUUM" performance for databases with many tables.
+    - Fix for rare Assert() crash triggered by UNION.
+    - Fix potentially incorrect results from index searches using ROW
+      inequality conditions.
+    - Tighten security of multi-byte character processing for UTF8
+      sequences over three bytes long.
+    - Fix possible crashes when an already-in-use PL/pgSQL function is
+      updated.
+    - Improve PL/pgSQL handling of domain types.
+    - Fix possible errors in processing PL/pgSQL exception blocks.
+  * debian/control: postgresql-client-8.2 provides postgresql-client. This
+    avoids breaking all the reverse dependencies to p-c when the transitional
+    package gets removed. Closes: #400648
+
+ -- Martin Pitt <mpitt@debian.org>  Sun,  4 Feb 2007 20:38:09 +0100
+
+postgresql-8.2 (8.2.1-2) experimental; urgency=low
+
+  * debian/libpq-dev.install: Install missing pg_trace.h.
+  * debian/control: Remove -contrib's libpg-perl recommendation, nothing in
+    -contrib uses it any more. Thanks to Peter Eisentraut for spotting this.
+    Closes: #408070
+  * debian/control: Update -contrib package description for 8.2. 
+    Closes: #408072
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 29 Jan 2007 16:55:45 +0100
+
+postgresql-8.2 (8.2.1-1) experimental; urgency=low
+
+  * New upstream bugfix release:
+    - Fix crash with SELECT ... LIMIT ALL (also LIMIT NULL).
+    - "Several /contrib/tsearch2" fixes (Teodor)
+    - Fix planner mistakes for outer join queries.
+    - Fix several problems in queries involving sub-SELECTs.
+    - Fix potential crash in SPI during subtransaction abort.
+      This affects all PL functions since they all use SPI.
+    - Improve build speed of PDF documentation.
+    - Re-add JST (Japan) timezone abbreviation.
+    - Improve optimization decisions related to index scans.
+    - Have psql print multi-byte combining characters as before, rather
+      than output as \u.
+    - Improve index usage of regular expressions that use parentheses.
+      This improves psql \d performance also.
+    - Make pg_dumpall assume that databases have public CONNECT
+      privilege, when dumping from a pre-8.2 server.
+      This preserves the previous behavior that anyone can connect to a
+      database if allowed by "pg_hba.conf".
+
+ -- Martin Pitt <mpitt@debian.org>  Mon,  8 Jan 2007 18:04:34 +0100
+
+postgresql-8.2 (8.2-1) experimental; urgency=low
+
+  * 8.2 final release.
+  * debian/control: Fix spelling of 'Tcl'. (See #401191)
+  * Added a watch file.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun,  3 Dec 2006 17:57:43 +0100
+
+postgresql-8.2 (8.2~rc1-1) experimental; urgency=low
+
+  * Release candidate 1.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 26 Nov 2006 15:59:11 +0100
+
+postgresql-8.2 (8.2~beta3-1) experimental; urgency=low
+
+  * New upstream beta release.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 11 Nov 2006 11:52:23 -0800
+
+postgresql-8.2 (8.2~beta2-1) experimental; urgency=low
+
+  * New upstream beta release.
+    - Documents ~/.pgpass file in psql(1). Closes: #308535
+    - Document long --format values in pg_dump(1). Closes: #308827
+    - Does not output &apos; any more in HTML mode. Closes: #353200
+  * debian/patches/{03-gettext-domains.patch,11-pg_regress-socketpath.patch}:
+    Adapted to new upstream version.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 29 Oct 2006 17:25:02 +0100
+
+postgresql-8.2 (8.2~beta1-2) experimental; urgency=low
+
+  * Move vacuumlo from -client to -contrib, since it is a contributed script.
+    Add appropriate Replaces:.
+  * debian/control: Fix libpq-dev dependency of -server-dev-8.2.
+    Closes: #393148
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 15 Oct 2006 17:40:06 +0200
+
+postgresql-8.2 (8.2~beta1-1) experimental; urgency=low
+
+  * First public beta release of 8.2, packaging based on current 8.1 tree.
+  * Major improvements and changes (see HISTORY for details):
+    - Improved sort performance with lower memory usage.
+    - More efficient locking with better concurency.
+    - New FILLFACTOR support for tables and indexes.
+    - Many query optimization improvements.
+    - More efficient vacuuming.
+    - Warm standby server enhancements.
+    - Monitoring, logging, and performance tuning additions.
+    - Query enhancements including RETURNING values, multi-VALUES,
+    - support, and self-joins for DELETE.
+    - More control over creating/dropping objects and inheritance.
+    - Index creation without blocking INSERT/UPDATE/DELETE.
+    - COPY TO support for SELECT statements.
+    - Array and aggregate improvements, including SQL:2003 statistical
+    - functions.
+    - Many /contrib improvements.
+
+ -- Martin Pitt <mpitt@debian.org>  Wed, 27 Sep 2006 20:38:06 +0200
+
+postgresql-8.1 (8.1.4-6) unstable; urgency=low
+
+  * debian/control: Drop heimdal-dev suggestion of libpq-dev. Closes: #379848
+  * debian/libpq-dev.install: Ship pg_wchar.h. Closes: #380047
+  * Transition for private python extension in p-plpython-8.1:
+    - debian/control:
+      + Bump cdbs/debhelper build dependency versions.
+      + Add {XS,XB}-Python-Version attributes.
+    - debian/compat: Use compat level 5.
+    - Add debian/pycompat: Use compat level 2.
+    - debian/rules: Call dh_pycentral and dh_python for p-plpython-8.1.
+    - Closes: #380898
+  * debian/control: Change the order of records so that the libraries come
+    first. With that, postgresql-client-8.1 and friends pick up the correct
+    shlibs. Closes: #381211
+
+ -- Martin Pitt <mpitt@debian.org>  Sun,  6 Aug 2006 12:31:37 +0200
+
+postgresql-8.1 (8.1.4-5) unstable; urgency=low
+
+  * debian/rules: Install init script at priority 19, since Apache and web
+    applications usually reside on priority 20, but often require a running
+    database. This follows a recent change in the MySQL package, thanks to
+    Christian Hammers for pointing this out. Closes: #379276
+  * Add debian/patches/12-pg_restore-ignore-failing-tables.patch:
+    - pg_restore: Add option -X no-data-for-failed-tables to ignore TABLE DATA
+      objects if the corresponding TABLE could not be created. Necessary for
+      fixing #351571.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 23 Jul 2006 10:34:55 +0200
+
+postgresql-8.1 (8.1.4-4) unstable; urgency=low
+
+  * debian/rules: Use -fPIC instead of -fpic to avoid FTBFS on sparc and m68k
+    (and maybe avoid the ICE on arm).
+  * debian/postgresql-8.1.init: Add LSB magic comment header (provide both
+    postgresql-8.1 and a generic postgresql service). Closes: #377882
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 11 Jul 2006 22:28:07 +0200
+
+postgresql-8.1 (8.1.4-3) unstable; urgency=low
+
+  * debian/control: Add missing comerr-dev and libkrb5-dev dependencies to
+    libpq-dev. Closes: #371158
+  * Add debian/patches/54-contrib-dbmirror-quoteparsing.patch: Fix parsing of
+    quotes escaped as '' in PendingData table. Closes: #375743
+  * Add debian/patches/55-contrib-admin.patch:
+    - Add the 'admin81' contrib module and build it. This provides
+      instrumentation functions for use with PgAdmin 3 and similar.
+    - http://www.postgresql.org/ftp/pgadmin3/release/v1.4.2/adminpacks/
+    - Closes: #354731
+  * debian/rules: Build with -fpic everywhere to improve the proactive
+    security effectivity of address space layout randomization. This has no
+    measurable performance impact on at least i386, amd64, and powerpc.  
+
+ -- Martin Pitt <mpitt@debian.org>  Fri,  7 Jul 2006 21:28:45 +0200
+
+postgresql-8.1 (8.1.4-2) unstable; urgency=medium
+
+  * Add debian/libpq4.shlibs and bump it to >= 8.1.4, to respect the
+    introduction of PQescapeStringConn() and PQescapeByteaConn().
+  * debian/postgresql-8.1.postrm, clean_dir(): Do not use rmdir's
+    --ignore-fail-on-nonempty, since that still falls apart when the
+    directory is a mountpoint. Just ignore errors.
+
+ -- Martin Pitt <mpitt@debian.org>  Fri,  2 Jun 2006 00:44:26 +0200
+
+postgresql-8.1 (8.1.4-1) unstable; urgency=medium
+
+  * New upstream security and bug fix release:
+    - The server now rejects invalidly-encoded multibyte characters in all
+      cases to defend against SQL-injection attacks. [CVE-2006-2313]
+    - Reject unsafe uses of \' in string literals (for client encodings that
+      allow SQL injection with this, like SJIS, BIG5, GBK, GB18030, or UHC). A
+      new configuration parameter backslash_quote is available to adjust this
+      behavior when needed. [CVE-2006-2314]
+    - Modify libpq's string-escaping routines to be aware of encoding
+      considerations and standard_conforming_strings
+      This fixes libpq-using applications for the security issues
+      described in CVE-2006-2313 and CVE-2006-2314, and also
+      future-proofs them against the planned changeover to SQL-standard
+      string literal syntax. Applications that use multiple PostgreSQL
+      connections concurrently should migrate to PQescapeStringConn() and
+      PQescapeByteaConn() to ensure that escaping is done correctly for
+      the settings in use in each database connection. Applications that
+      do string escaping "by hand" should be modified to rely on library
+      routines instead.
+    - Various bug fixes, see upstream changelog for details.
+  * Remove debian/patches/12-krb5-multiusers.patch: Fixed upstream.
+  * debian/postgresql-8.1.init: Add a comment to point out that environment
+    variables need to be set in the 'environment' file, not in the init
+    script.
+  * debian/postgresql-8.1.init, debian/postgresql-8.1.postinst: Do not fail if
+    init.d-functions/maintscripts-functions are not present, which happens if
+    postgresql-{8.1,common} are removed, but not purged. Closes: #362488
+  * Bump Standards-Version to 3.7.2.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 22 May 2006 10:33:20 +0200
+
+postgresql-8.1 (8.1.3-4) unstable; urgency=low
+
+  * debian/rules:
+    - Put --as-needed into LDFLAGS instead of CFLAGS to avoid warnings when
+      building extension modules. Closes: #360759
+    - Fix a bashism.
+  * debian/control: Suggest oidentd | ident-server (oidentd prefered since it
+    works with IPv6). Closes: #359193
+  * libecpg-dev: Move manpage to /usr/share/man/man1 where it belongs to.
+    Closes: #360817
+  * debian/rules: Ship the tutorial's Makefile and ship the SQL *.source files
+    (not the generated *.sql files) to get the correct path to the built
+    libraries. Closes: #360469
+  * Add debian/patches/13-tutorial-README.patch: Remove confusing note about
+    make and point out that p-server-dev-8.1 is required for building the
+    tutorial.
+  * debian/postgresql-contrib-8.1.install, 50-contrib-oracle-enable.patch:
+    Move Ora2Pg.pm to /usr/share/postgresql/8.1 and adapt the library search
+    path in ora2pg.pl accordingly. Closes: #360818
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 10 Apr 2006 22:43:11 +0200
+
+postgresql-8.1 (8.1.3-3) unstable; urgency=low
+
+  * debian/postgresql-8.1.init: Use shell 'sh -e' instead of bash.
+  * debian/postgresql-contrib-8.1.install: Ship ora2pg.pl and Ora2Pg.pm.
+  * debian/control: Updated contrib package description. Closes: #355172
+  * debian/rules: Don't special-case HPPA for --enable-thread-safety-force;
+    the current kernel seems to cope with threads quite well, so that the
+    configure check does not hang any more. Closes: #315440
+  * debian/control: Build server packages on mips and mipsel again, even if
+    they do not work. No need to block testing migration forever (the
+    ftp-masters seem reluctant to remove the mips binaries, see #344487), and
+    the bug is in binutils, not PostgreSQL itself (see #357603).
+
+ -- Martin Pitt <mpitt@debian.org>  Sat,  1 Apr 2006 22:13:03 +0200
+
+postgresql-8.1 (8.1.3-2) unstable; urgency=low
+
+  * Re-enable 'do not run as root' check from upstream:
+    - Move debian/patches/08-disable-root-check.patch to
+      debian/disable-root-check.patch.
+    - debian/rules: Move test suite to binary/predeb and apply
+      disable-root-check.patch manually right before calling the test suite.
+      Unapply debian/disable-root-check.patch after executing the
+      test suite to not break subsequent package builds.
+    - With this, the test suite can happily run as (fake)root during package
+      build without disabling the check in the actual packages.
+  * postgresql-doc-8.1: Ship tutorial C and SQL files.
+    (https://launchpad.net/bugs/30233)
+  * debian/control, postgresql-client-8.1: Depend on postgresql-client-common
+    instead of postgresql-common.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 18 Mar 2006 15:21:27 +0100
+
+postgresql-8.1 (8.1.3-1) unstable; urgency=low
+
+  * New upstream security and bug fix release:
+    - Fix bug that allowed any logged-in user to "SET ROLE" to any other
+      database user id (CVE-2006-0553).
+    - See upstream changelog for detailled changes.
+  * Remove debian/patches/80-cvs-pg_restore-COPY.patch: Upstream now.
+  * debian/rules: Use --as-needed linker option to avoid excessive
+    library dependencies.
+  * debian/control: Remove unnecessary dependencies from PL/Python and PL/Tcl
+    packages.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 14 Feb 2006 17:46:31 +0100
+
+postgresql-8.1 (8.1.2-2) unstable; urgency=low
+
+  * debian/patches/09-relax-sslkey-permscheck.patch: Do not check for any
+    particular group if the SSL key is group readable, to allow sharing a
+    common SSL certificate with other server processes.
+  * debian/control: Add ${shlibs:Depends} to packages which need it.
+    Closes: #348066
+  * debian/control, libecpg5: Remove obsolete Provides/Conflicts to ecpg.
+  * Add debian/patches/80-cvs-pg_restore-COPY.patch:
+    - Fix pg_restore to properly discard COPY data when trying to continue
+      after an error in a COPY statement.  Formerly it thought the COPY data
+      was SQL commands, and got quite confused.
+    - Patch from Stephen Frost, taken from upstream CVS.
+  * Add debian/patches/12-krb5-multiusers.patch:
+    - Fix krb5 credential handling in libpq for multiple connections with
+      different users: Don't keep credentials in global variables, but pass
+      them around in a new krb5_info struct.
+    - Patch from Stephen Frost, proposed to be adopted upstream.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon,  6 Feb 2006 21:07:31 +0100
+
+postgresql-8.1 (8.1.2-1) unstable; urgency=medium
+
+  * New upstream bugfix release:
+    - Fix bug introduced in 8.0 that could allow ReadBuffer to return an
+      already-used page as new, potentially causing loss of recently-committed
+      data.
+    - Fix for protocol-level Describe messages issued outside a
+      transaction or in a failed transaction.
+    - Fix character string comparison for locales that consider different
+      character combinations as equal, such as Hungarian.
+      This might require "REINDEX" to fix existing indexes on textual
+      columns.
+    - Set locale environment variables during postmaster startup to
+      ensure that plperl won't change the locale later. This fixes a problem
+      that occurred if the postmaster was started
+      with environment variables specifying a different locale than what
+      initdb had been told. Under these conditions, any use of plperl was
+      likely to lead to corrupt indexes. You may need "REINDEX" to fix
+      existing indexes on textual columns if this has happened to you.
+      (postgresql-common checks and aborts on this condition.)
+    - Allow more flexible relocation of installation directories.
+      Previous releases supported relocation only if all installation
+      directory paths were the same except for the last component.
+      This makes the test suite work with Debian's directory structure, so
+      that the horology test can find the timezones again and pass.
+    - Prevent crashes caused by the use of ISO-8859-5 and ISO-8859-9
+      encodings.
+    - Fix longstanding bug in strpos() and regular expression handling in
+      certain rarely used Asian multi-byte character sets.
+    - Fix bug where COPY CSV mode considered any \. to terminate the copy
+      data. The new code requires \. to appear alone on a line, as per
+      documentation.
+    - Make COPY CSV mode quote a literal data value of \. to ensure it
+      cannot be interpreted as the end-of-data marker.
+    - Various fixes for functions returning RECORDs.
+    - Fix processing of "postgresql.conf" so a final line with no newline
+      is processed properly.
+    - Fix bug in "/contrib/pgcrypto" gen_salt, which caused it not to use
+      all available salt space for MD5 and XDES algorithms.  Salts for
+      Blowfish and standard DES are unaffected.
+    - Fix autovacuum crash when processing expression indexes.
+    - Fix "/contrib/dblink" to throw an error, rather than crashing, when
+      the number of columns specified is different from what's actually
+      returned by the query.
+  * Remove debian/patches/12-readline-prompt-ignore.patch: Adopted upstream.
+  * Bump postgresql-common dependencies to >= 39. This will ensure more
+    robust upgrades and other bug fixes.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon,  9 Jan 2006 18:34:31 +0100
+
+postgresql-8.1 (8.1.1-2) unstable; urgency=low
+
+  * Do not build postgresql-8.1, p-contrib-8.1, and the PL/ packages on mips
+    and mipsel, since the postmaster just SIGBUSes on these architectures and
+    nobody seems to be able to fix that.
+  * Add debian/patches/12-readline-prompt-ignore.patch: Do not prepend a
+    '\001' before the 'prompt ignore begin/end' readline commands; this is a
+    bash quirk, not a readline feature. Thanks to Aaron Schrab. 
+    Closes: #343616
+
+ -- Martin Pitt <mpitt@debian.org>  Thu, 22 Dec 2005 19:13:21 +0100
+
+postgresql-8.1 (8.1.1-1) unstable; urgency=low
+
+  * New upstream bug fix release.
+  * Remove debian/patches/80_cvs_crash_deform_tuple.patch, upstream now.
+  * debian/postgresql-8.1.postrm: Also clean start.conf if purging without
+    pg_dropcluster.
+  * debian/postgresql-8.1.postrm: Check if a /etc/postgresql/8.1 subdirectory
+    is really a cluster directory before trying to remove it. Closes: #339810
+  * Ship upstream changelog.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 12 Dec 2005 17:27:57 +0100
+
+postgresql-8.1 (8.1.0-3) unstable; urgency=low
+
+  * debian/rules: Remove superfluous R include path.
+  * debian/control: Version the libpq-dev dependency of -server-dev-8.1 to
+    avoid horrible breakage.
+  * Add debian/patches/80_cvs_crash_deform_tuple.patch:
+    - Fix crash in tuple deformator (stolen from CVS head).
+    - Closes: #339527
+  * Add debian/patches/52-contrib-dbase-enable-iconv.patch:
+    - Enable iconv support for 'dbf2pg' contrib module.
+    - Closes: #338645
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 20 Nov 2005 17:01:53 +0100
+
+postgresql-8.1 (8.1.0-2) unstable; urgency=low
+
+  * Do not install pg_config and its mo files into postgresql-server-dev-8.1
+    any more, since libpq-dev now ships it. Closes: #338231
+  * debian/control: Clean up contrib description. Closes: #338308
+
+ -- Martin Pitt <mpitt@debian.org>  Wed,  9 Nov 2005 20:29:16 -0500
+
+postgresql-8.1 (8.1.0-1) unstable; urgency=low
+
+  * Final 8.1.0 upstream release, first unstable upload.
+  * Build client libraries (-8.0 does not build them any more).
+  * Add debian/patches/11-server-includedir.patch: Change server include
+    directory to /usr/include/postgresql/8.1/server since we do want to
+    keep apart server include files.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat,  5 Nov 2005 18:57:00 -0500
+
+postgresql-8.1 (8.0+8.1rc1-1) experimental; urgency=low
+
+  * Upgrade to 8.1rc1 release.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 31 Oct 2005 17:43:19 -0500
+
+postgresql-8.1 (8.0+8.1beta4-2) experimental; urgency=low
+
+  * Clean up the installation path ./configure arguments.
+    - debian/rules: Use default libdir /usr/lib.
+    - Add debian/patches/10-pkglibdir.patch: Set pkglibdir to
+      /usr/lib/postgresql/8.1/lib instead of /usr/lib/postgresql.
+
+ -- Martin Pitt <mpitt@debian.org>  Wed, 26 Oct 2005 20:45:02 +0100
+
+postgresql-8.1 (8.0+8.1beta4-1) experimental; urgency=low
+
+  * Upgrade to 8.1beta4 release.
+  * Adopt patches to new upstream version:
+    - 09-relax-sslkey-permscheck.patch
+  * debian/postgresql-8.1.postrm: clean_dir(): Ensure that directory is not a
+    symbolic link before attempting to rmdir it. Closes: #333867
+  * debian/rules: Remove obsolete --disable-spinlocks build option for mips.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 24 Oct 2005 16:59:53 +0200
+
+postgresql-8.1 (8.0+8.1beta3-1) experimental; urgency=low
+
+  * Upgrade to 8.1beta3 release.
+  * Drop debian/patches/81-beta2.patch: beta2->beta3 changes are too big to be
+    sensibly stuffed into a patch.
+  * Adopt patches to new upstream version:
+    - 03-gettext-domains.patch
+  * Remove patches which are upstream now:
+    - 52-contrib-dbf2pg-errorcheck.patch
+    - 53-contrib-dbf2pg-textfield
+  * debian/patches/09-relax-sslkey-permscheck.patch: Use effective rather than
+    real group id for checking the private SSL certificate permissions. It
+    does not make any practical difference, but is more consistent.
+  * Rename patch 01-top-makefile.patch to 01-build-contrib.patch to give a
+    better idea of what it does.
+
+ -- Martin Pitt <mpitt@debian.org>  Thu, 13 Oct 2005 18:32:33 +0200
+
+postgresql-8.1 (8.0+8.1beta-4) experimental; urgency=low
+
+  * Add debian/patches/09-relax-sslkey-permscheck.patch:
+    - Relax security check on private SSL key file: The file is also
+      considered safe if it has owner and/or group "root", and if it is
+      group-readable (unless the group is something other than root or the
+      database owner group).
+    - See bug #327901.
+
+ -- Martin Pitt <mpitt@debian.org>  Wed, 21 Sep 2005 22:52:39 +0200
+
+postgresql-8.1 (8.0+8.1beta-3) experimental; urgency=low
+
+  * Add debian/patches/81-beta2.patch: Upgrade to 8.1beta2 release.
+  * Remove debian/patches/80-s_lock.h-m68k.patch: Included upstream now.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon, 19 Sep 2005 08:31:22 +0200
+
+postgresql-8.1 (8.0+8.1beta-2) experimental; urgency=low
+
+  * debian/postgresql-8.1.postrm: Do not remove an empty /var/log/postgresql,
+    postgresql-common now cares for it to not break log rotation. (See
+    #325330)
+  * Remove debian/postgresql-server-dev-8.1.manpages: Do not install the
+    manpage, since it belongs to libpq-dev (which is currently built by
+    postgresql-8.0). Closes: #327379
+  * debian/postgresql-server-dev-8.1.install: Ship pg_config.
+  * Build-depend on libpq-dev to pull in libpq4 dependencies for binary
+    packages. This hack is necessary as long as we build libpq from
+    postgresql-8.0. Closes: #327765
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 13 Sep 2005 22:04:54 +0200
+
+postgresql-8.1 (8.0+8.1beta-1) experimental; urgency=low
+
+  * First public beta version.
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 26 Aug 2005 09:00:47 +0200
+
+postgresql-8.1 (8.0+8.1alpha-1) experimental; urgency=low
+
+  * New upstream snapshot release. The first beta is close to be released, and
+    I want to be prepared for that.
+  * Package based on postgresql-8.0 8.0.3-13; don't build client libraries yet
+    until 8.1 final is released.
+
+ -- Martin Pitt <mpitt@debian.org>  Wed, 24 Aug 2005 08:34:00 +0200
+
+postgresql-8.0 (8.0.3-13) unstable; urgency=low
+
+  * debian/control: Fix libpq4 description, it is compatible with servers
+    starting from 7.3.
+  * Move back client include files to /usr/include/postgresql/ for now to
+    not render all client packages unbuildable which have not yet converted
+    to pg_config:
+    - debian/rules: Configure with include dir /usr/include/postgresql.
+    - debian/libecpg-dev.install, debian/libpq-dev.install: Install files from
+      and to /usr/include/postgresql
+    - Add debian/patches/13_server_includedir.patch: Change server include
+      directory back to /usr/include/postgresql/8.0/server since we do want to
+      keep apart server include files.
+    - Closes: #322085
+  * Drop obsolete xml contrib module, build and ship xml2 instead:
+    - Remove debian/patches/51-contrib-xml-enable.patch
+    - Add debian/patches/51-contrib-xml2-enable.patch
+    - debian/control: Add build dependency libxslt1-dev.
+    - debian/postgresql-contrib-8.0.install: Ship pgxml.so, drop pgxml_dom.so.
+    - Closes: #322777
+  * Add debian/patches/14-mips-gcc4.patch:
+    - Add a proper test-and-set function for mips and mipsel. Thanks to Thiemo
+      Seufer for the patch and Aurelien Jarno for his help. This now also
+      works with gcc 4.
+  * debian/rules: Remove the --disable-spinlocks option for mips again, now
+    that we have a proper patch for that.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat, 20 Aug 2005 17:34:01 +0200
+
+postgresql-8.0 (8.0.3-12) unstable; urgency=low
+
+  * debian/rules:
+    - Robustify log output in case of a failed test suite; also print out
+      regression.diffs if it fails. Closes: #319218
+    - Don't run the test suite if DEB_BUILD_OPTIONS contains "nocheck".
+  * Add debian/check_installed_files to check for upstream installed files
+    which are not shipped in any deb.
+  * debian/postgresql-contrib-8.0.install: Ship pgxml_dom.so. Closes: #318922
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 24 Jul 2005 17:35:56 +0200
+
+postgresql-8.0 (8.0.3-11) unstable; urgency=low
+
+  * Add debian/patches/12-disable-root-check.patch: Disable "am I root" test
+    in initdb and postmaster to be able to run the test suite at build time.
+    This check is already done in pg_createcluster.
+  * debian/rules: Remove all the chown/setuid crack and simply call "make
+    check" now; print the log files if the test fails.
+  * debian/patches/10-testsuite-params.patch: Disable authentication in the
+    test suite db since ident authentication does not work with fakeroot.
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 15 Jul 2005 13:31:51 +0300
+
+postgresql-8.0 (8.0.3-10) unstable; urgency=low
+
+  * debian/rules: If the test suite fails, don't let the build fail but rather
+    cat the log files. Once the test suite calling works reliably, the
+    previous behaviour can be restored.
+
+ -- Martin Pitt <mpitt@debian.org>  Thu, 14 Jul 2005 14:19:30 +0300
+
+postgresql-8.0 (8.0.3-9) unstable; urgency=low
+
+  * Bump Standards-Version to 3.6.2.
+  * debian/rules: Use start-stop-daemon instead of su to call the test suite
+    since su requires a terminal.
+  * debian/rules: Disable spinlocks on mips and mipsel for now since they
+    FTBFS with gcc-4.0.
+
+ -- Martin Pitt <mpitt@debian.org>  Wed, 13 Jul 2005 22:22:59 +0300
+
+postgresql-8.0 (8.0.3-8) unstable; urgency=low
+
+  * postgresql-client-8.0: Now suggest postgresql-8.0; clarified the
+    description wrt the server package (see #313247).
+  * Fix README.Debian symlink.
+  * Add debian/patches/10-testsuite-params.patch: Use /tmp as the socket
+    directory when running the test suite.
+  * debian/rules: Call the test suite when building the package. Since
+    creating databases as root is not permitted, do this as "nobody" if run by
+    root (as on the buildds); don't do it at all if run with fakeroot.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 12 Jul 2005 19:10:03 +0300
+
+postgresql-8.0 (8.0.3-7) unstable; urgency=low
+
+  * Removed some redundant configure options which cdbs applies anyway.
+  * configure with --enable-thread-safety-force on HPPA since the configure
+    check triggers a kernel bug on the buildd. (See #315440)
+  * debian/postgresql-8.0.init: autovac-* functions in postgresql-common were
+    renamed to autovac_* to comply to POSIX shell standard (see #315551).
+    Adaped dependencies.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 26 Jun 2005 14:23:32 +0200
+
+postgresql-8.0 (8.0.3-6) unstable; urgency=low
+
+  * Added debian/postgresql-8.0.links: Symlink README.Debian from
+    postgresql-common.
+  * Added debian/patches/08-timezone-inttimestamps.patch (stolen from CVS
+    head): Fix integer timestamps in time zone handling.
+    Closes: #249417, #311533.
+  * debian/rules: Fix POT file generation.
+  * Added debian/patches/09-libpq-defaultsocketdir.patch:
+    - Set default socket directory for libpq to /var/run/postgresql.
+      Closes: #313507, #313602
+  * Adjusted packages to follow upstream library SONAME change in 8.0.3:
+    libecpg4 -> libecpg5, libecpg-compat1 -> libecpg-compat2, 
+    libpgtypes1 -> libpgtypes2. Closes: #313452, #313453, #313454
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 14 Jun 2005 19:58:10 +0200
+
+postgresql-8.0 (8.0.3-5) unstable; urgency=low
+
+  * debian/rules: Generate POT files to help translators.
+  * Added debian/libpq-dev.manpages: Install pg_wrapper(1) manpage.
+    Closes: #311671
+  * debian/control: Restrict libpq-dev conflict to postgresql-dev to
+    versions << 7.5. Closes: #312827
+
+ -- Martin Pitt <mpitt@debian.org>  Fri, 10 Jun 2005 19:01:20 +0200
+
+postgresql-8.0 (8.0.3-4) unstable; urgency=low
+
+  * First unstable upload.
+  * debian/control: Now build with libreadline5-dev instead of version 4.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue,  7 Jun 2005 12:15:43 +0200
+
+postgresql-8.0 (8.0.3-3) experimental; urgency=low
+
+  * Added libpq4 dependency to libpq-dev.
+  * postgresql-contrib-8.0.install: Correct paths to install missing shared
+    files and documentation. (Closes: #311553)
+  * libpq-dev.install: Install some more header files from server/ which are
+    required by client libraries.
+
+ -- Martin Pitt <mpitt@debian.org>  Mon,  6 Jun 2005 12:24:57 +0200
+
+postgresql-8.0 (8.0.3-2) experimental; urgency=low
+
+  * Added CAN numbers to previous changelog entries.
+  * debian/patches/07-postgresql.conf.patch: Enable listen_addresses = '*' by
+    default.
+  * debian/control, libpq-dev: Conflict to and replace postgresql-dev.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 31 May 2005 11:09:48 +0200
+
+postgresql-8.0 (8.0.3-1) experimental; urgency=low
+
+  * New upstream release:
+    - Prevent calling conversion functions by users. [CAN-2005-1409]
+    - Prevent calling tsearch2 functions by users. [CAN-2005-1410]
+  * debian/libpq-dev.{install,links}: Install pg_config into
+    /usr/lib/postgresql/8.0/bin to make it print correct paths, and install a
+    symlink into /usr/bin instead. Closes: #305200
+  * debian/rules: Change include dir configure option to
+    /usr/include/postgresql/8.0, so that different versions of
+    postgresql-server-dev-<version> do not conflict with each other. Since
+    applications using the libpq-dev are supposed to use pg_config, this
+    should not break them either.
+
+ -- Martin Pitt <mpitt@debian.org>  Thu, 12 May 2005 23:37:56 +0200
+
+postgresql-8.0 (8.0.2-1) experimental; urgency=low
+
+  * New upstream release:
+    - Removed debian/patches/02-libpq-soname.patch, upstream adopted SONAME
+      change to libpq4.
+  * Ship "reindexdb" in -contrib.
+  * Added debian/patches/02_pager.patch: Use /usr/bin/pager as default pager
+    in psql. Closes: #304459
+  * Added debian/postgresql-doc-8.0.doc-base: Register doc package in
+    doc-base.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue, 19 Apr 2005 21:19:50 +1000
+
+postgresql-8.0 (8.0.1-4) experimental; urgency=low
+
+  * Ship pg_config in libpq-dev instead of postgresql-8.0; added
+    proper package conflict. Closes: #303257
+  * Install pg_config in /usr/bin instead of 8.0-specific bin dir.
+    Closes: #302368
+  * debian/postgresql-8.0.init: Added autovacuum functions.
+
+ -- Martin Pitt <mpitt@debian.org>  Tue,  5 Apr 2005 23:15:31 +0200
+
+postgresql-8.0 (8.0.1-3) experimental; urgency=low
+
+  * Dropped pgxs package, the Makefiles are now part of postgresql-server-dev.
+  * -contrib: Only recommend, not depend on libpg-perl and libdbd-pg-perl.
+  * Renamed packages pg-pl*-8.0 to postgresql-pl*-8.0 for consistency.
+  * Added debian/patches/07-postgresql.conf.patch:
+    - Patch for Debian changes to the default configuration.
+    - Enable stats_row_level to allow pg_autovacuum to work.
+
+ -- Martin Pitt <mpitt@debian.org>  Sat,  2 Apr 2005 18:21:57 +0200
+
+postgresql-8.0 (8.0.1-2) experimental; urgency=low
+
+  * Changed dependency of pg-pltcl-8.0 from libtcl8.4 to tcl8.4
+  * Now depend on postgresql-common >= 3 which provides more maintainer script
+    functions.
+  * Compress manpages.
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 20 Mar 2005 21:23:10 +0100
+
+postgresql-8.0 (8.0.1-1) experimental; urgency=low
+
+  * New upstream release. Closes: #274043, #291350
+    - Ignores shell backticks with invalid meta-commands. Closes: #285844
+    - Fixes uninitialized error strings when connecting to a server which is
+      down. Closes: #264603, #277757
+    - configure script supports GNU/Hurd and GNU/k*BSD. Closes: #262081
+    - Fixes comma splices in HTML documentation. Closes: #243781
+    - Now upper() and lower() work also for Unicode characters.
+      Closes: #139389, #290118, #290399
+    - New configuration variable max_stack_depth which prevents DoS situations
+      due to infinite recursion. Closes: #239811
+    - Reportedly works with Turkish locale. Closes: #305886
+    - This version is not vulnerable against the following security issues:
+      . Load arbitrary shared libs, execute startup function [CAN-2005-0227]
+      . Execute functions with aggregate wrapper [CAN-2005-0244]
+      . Buffer overflow and 64-bit issues in contrib/intagg [CAN-2005-0246]
+      . Buffer overflows in the PL/PGSQL parser in gram.y [CAN-2005-0247]
+      . Insecure temporary files in make_oidjoins_check [CAN-2004-0977]
+  * Splitted development package into libpq-dev and postgresql-server-dev. 
+    Closes: #280417
+  * Splitted libecpg4 into libecpg4, libecpg-compat1 and libpgtypes1.
+  * Old libpgtcl package does not exist any more. The PL/TCL procedural
+    language is now shipped in pg-pltcl8.0, the TCL client library is not
+    shipped by PostgreSQL any more. Closes: #280418
+  * Now use /var/lib/postgresql/ as (default) data directory. Closes: #285929
+
+ -- Martin Pitt <mpitt@debian.org>  Sun, 20 Feb 2005 19:17:17 +0100
+
--- postgresql-8.3-8.3.9.orig/debian/postgresql-contrib-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-contrib-8.3.install
@@ -0,0 +1,39 @@
+usr/share/doc/postgresql-doc-8.3/contrib/* usr/share/doc/postgresql-contrib-8.3
+usr/share/postgresql/8.3/contrib/*
+usr/lib/postgresql/8.3/bin/oid2name
+usr/lib/postgresql/8.3/bin/pgbench
+usr/lib/postgresql/8.3/bin/vacuumlo
+usr/lib/postgresql/8.3/bin/pg_standby
+usr/lib/postgresql/8.3/lib/_int.so
+usr/lib/postgresql/8.3/lib/autoinc.so
+usr/lib/postgresql/8.3/lib/btree_gist.so
+usr/lib/postgresql/8.3/lib/chkpass.so
+usr/lib/postgresql/8.3/lib/cube.so
+usr/lib/postgresql/8.3/lib/dblink.so
+usr/lib/postgresql/8.3/lib/earthdistance.so
+usr/lib/postgresql/8.3/lib/fuzzystrmatch.so
+usr/lib/postgresql/8.3/lib/insert_username.so
+usr/lib/postgresql/8.3/lib/int_aggregate.so
+usr/lib/postgresql/8.3/lib/lo.so
+usr/lib/postgresql/8.3/lib/ltree.so
+usr/lib/postgresql/8.3/lib/moddatetime.so
+usr/lib/postgresql/8.3/lib/pageinspect.so
+usr/lib/postgresql/8.3/lib/pg_trgm.so
+usr/lib/postgresql/8.3/lib/pgcrypto.so
+usr/lib/postgresql/8.3/lib/pgstattuple.so
+usr/lib/postgresql/8.3/lib/refint.so
+usr/lib/postgresql/8.3/lib/seg.so
+usr/lib/postgresql/8.3/lib/tablefunc.so
+usr/lib/postgresql/8.3/lib/timetravel.so
+usr/lib/postgresql/8.3/lib/pgxml.so
+usr/lib/postgresql/8.3/lib/pg_buffercache.so
+usr/lib/postgresql/8.3/lib/adminpack.so
+usr/lib/postgresql/8.3/lib/sslinfo.so
+usr/lib/postgresql/8.3/lib/isn.so
+usr/lib/postgresql/8.3/lib/hstore.so
+usr/lib/postgresql/8.3/lib/pgrowlocks.so
+usr/lib/postgresql/8.3/lib/pg_freespacemap.so
+usr/lib/postgresql/8.3/lib/uuid-ossp.so
+usr/lib/postgresql/8.3/lib/test_parser.so
+usr/lib/postgresql/8.3/lib/dict_int.so
+usr/lib/postgresql/8.3/lib/dict_xsyn.so
--- postgresql-8.3-8.3.9.orig/debian/postgresql-doc-8.3.doc-base
+++ postgresql-8.3-8.3.9/debian/postgresql-doc-8.3.doc-base
@@ -0,0 +1,13 @@
+Document: postgresql-8.3
+Title: PostgreSQL 8.3 Documentation
+Author: The PostgreSQL Global Development Group
+Abstract: The documentation for the PostgreSQL database management system,
+ version 8.3. PostgreSQL is a sophisticated Object-Relational DBMS, supporting
+ almost all SQL constructs, including subselects, transactions, and
+ user-defined types and functions.
+Section: Data Management
+
+Format: HTML
+Index: /usr/share/doc/postgresql-doc-8.3/html/index.html
+Files: /usr/share/doc/postgresql-doc-8.3/html/*
+
--- postgresql-8.3-8.3.9.orig/debian/libecpg-dev.manpages
+++ postgresql-8.3-8.3.9/debian/libecpg-dev.manpages
@@ -0,0 +1 @@
+debian/tmp/usr/share/postgresql/8.3/man/man1/ecpg.1
--- postgresql-8.3-8.3.9.orig/debian/watch
+++ postgresql-8.3-8.3.9/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://ftp8.us.postgresql.org/postgresql/source/(v8\.3.*)/postgresql-(8\.3.*)\.tar\.bz2
--- postgresql-8.3-8.3.9.orig/debian/postgresql-pltcl-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-pltcl-8.3.install
@@ -0,0 +1,3 @@
+usr/lib/postgresql/8.3/lib/pltcl.so
+usr/lib/postgresql/8.3/bin/pltcl_*
+usr/share/postgresql/8.3/unknown.pltcl
--- postgresql-8.3-8.3.9.orig/debian/postgresql-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-8.3.install
@@ -0,0 +1,31 @@
+usr/lib/postgresql/8.3/bin/initdb
+usr/lib/postgresql/8.3/bin/ipcclean
+usr/lib/postgresql/8.3/bin/pg_controldata
+usr/lib/postgresql/8.3/bin/pg_ctl
+usr/lib/postgresql/8.3/bin/pg_resetxlog
+usr/lib/postgresql/8.3/bin/postgres
+usr/lib/postgresql/8.3/bin/postmaster
+usr/lib/postgresql/8.3/lib/*_and_*.so
+usr/lib/postgresql/8.3/lib/plpgsql.so
+usr/lib/postgresql/8.3/lib/dict_snowball.so
+usr/lib/postgresql/8.3/lib/tsearch2.so
+usr/share/locale/*/LC_MESSAGES/initdb-8.3.mo
+usr/share/locale/*/LC_MESSAGES/pg_controldata-8.3.mo
+usr/share/locale/*/LC_MESSAGES/pg_ctl-8.3.mo
+usr/share/locale/*/LC_MESSAGES/pg_resetxlog-8.3.mo
+usr/share/locale/*/LC_MESSAGES/postgres-8.3.mo
+usr/share/postgresql/8.3/man/man1/initdb.1
+usr/share/postgresql/8.3/man/man1/ipcclean.1
+usr/share/postgresql/8.3/man/man1/pg_controldata.1
+usr/share/postgresql/8.3/man/man1/pg_ctl.1
+usr/share/postgresql/8.3/man/man1/pg_resetxlog.1
+usr/share/postgresql/8.3/man/man1/postgres.1
+usr/share/postgresql/8.3/man/man1/postmaster.1
+usr/share/postgresql/8.3/timezonesets/*
+usr/share/postgresql/8.3/tsearch_data
+usr/share/postgresql/8.3/*.sql
+usr/share/postgresql/8.3/*.conf.sample
+usr/share/postgresql/8.3/postgres.bki
+usr/share/postgresql/8.3/postgres.description
+usr/share/postgresql/8.3/postgres.shdescription
+usr/share/postgresql/8.3/sql_features.txt
--- postgresql-8.3-8.3.9.orig/debian/postgresql-8.3.postrm
+++ postgresql-8.3-8.3.9/debian/postgresql-8.3.postrm
@@ -0,0 +1,60 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+VERSION=8.3
+
+clean_dir() {
+    if [ -d "$1" ] && [ ! -L "$1" ]; then
+        rmdir "$1" >/dev/null 2>/dev/null || true
+    fi
+}
+
+drop_cluster() {
+    # if we still have the postgresql-common package, use it to also shutdown
+    # server, etc.; otherwise just remove the directories
+    if [ -x /usr/bin/pg_dropcluster ]; then
+        pg_dropcluster --stop-server $VERSION "$1"
+    else
+        # remove data directory
+        PGDATALINK="/etc/postgresql/$VERSION/$1/pgdata"
+        if [ -e "$PGDATALINK" ]; then
+            rm -rf $(readlink -f "$PGDATALINK") "$PGDATALINK"
+        else
+            rm -rf "/var/lib/postgresql/$VERSION/$1/"
+        fi
+
+        # remove log file, including rotated ones
+        LOGLINK="/etc/postgresql/$VERSION/$1/log"
+        if [ -e "$LOGLINK" ]; then
+            LOG=$(readlink -f "$LOGLINK")
+            rm -f $LOG* "$LOGLINK"
+        else
+            rm -f /var/log/postgresql/postgresql-$VERSION-"$1".log*
+        fi
+
+        # remove conffiles
+        for f in pg_hba.conf pg_ident.conf postgresql.conf start.conf environment; do
+            rm -f /etc/postgresql/$VERSION/"$1"/$f
+        done
+
+        clean_dir /etc/postgresql/$VERSION/"$1"
+    fi
+}
+
+if [ "$1" = purge ]; then
+    [ -d "/etc/postgresql/$VERSION" ] || exit 0
+    if [ "$(ls /etc/postgresql/$VERSION)" ]; then
+        for c in /etc/postgresql/$VERSION/*; do
+            [ -e "$c/postgresql.conf" ] || continue
+            cluster=$(basename "$c")
+            echo "Dropping cluster $cluster..."
+            drop_cluster "$cluster"
+        done
+    fi
+
+    clean_dir /etc/postgresql/$VERSION
+    clean_dir /etc/postgresql
+    clean_dir /var/lib/postgresql/$VERSION
+    clean_dir /var/lib/postgresql
+fi
--- postgresql-8.3-8.3.9.orig/debian/disable-root-check.patch
+++ postgresql-8.3-8.3.9/debian/disable-root-check.patch
@@ -0,0 +1,36 @@
+diff -Nur postgresql-8.3/build-tree/postgresql-8.3beta1/src/backend/main/main.c postgresql-8.3.new/build-tree/postgresql-8.3beta1/src/backend/main/main.c
+--- postgresql-8.3beta1/src/backend/main/main.c	2006-09-26 00:50:41.000000000 +0200
++++ postgresql-8.3beta1/src/backend/main/main.c	2006-09-26 00:51:43.000000000 +0200
+@@ -326,7 +326,7 @@
+ check_root(const char *progname)
+ {
+ #ifndef WIN32
+-	if (geteuid() == 0)
++	if (0 && geteuid() == 0)
+ 	{
+ 		write_stderr("\"root\" execution of the PostgreSQL server is not permitted.\n"
+ 					 "The server must be started under an unprivileged user ID to prevent\n"
+diff -Nur postgresql-8.3/build-tree/postgresql-8.3beta1/src/bin/initdb/initdb.c postgresql-8.3.new/build-tree/postgresql-8.3beta1/src/bin/initdb/initdb.c
+--- postgresql-8.3beta1/src/bin/initdb/initdb.c	2006-09-26 00:50:41.000000000 +0200
++++ postgresql-8.3beta1/src/bin/initdb/initdb.c	2006-09-26 00:52:09.000000000 +0200
+@@ -636,7 +636,7 @@
+ 
+ 	pw = getpwuid(geteuid());
+ 
+-	if (geteuid() == 0)			/* 0 is root's uid */
++	if (0 && geteuid() == 0)		/* 0 is root's uid */
+ 	{
+ 		fprintf(stderr,
+ 				_("%s: cannot be run as root\n"
+diff -Nur postgresql-8.3/build-tree/postgresql-8.3beta1/src/bin/pg_ctl/pg_ctl.c postgresql-8.3.new/build-tree/postgresql-8.3beta1/src/bin/pg_ctl/pg_ctl.c
+--- postgresql-8.3beta1/src/bin/pg_ctl/pg_ctl.c	2006-09-26 00:50:41.000000000 +0200
++++ postgresql-8.3beta1/src/bin/pg_ctl/pg_ctl.c	2006-09-26 00:52:23.000000000 +0200
+@@ -1517,7 +1517,7 @@
+ 	 * Disallow running as root, to forestall any possible security holes.
+ 	 */
+ #ifndef WIN32
+-	if (geteuid() == 0)
++	if (0 && geteuid() == 0)
+ 	{
+ 		write_stderr(_("%s: cannot be run as root\n"
+ 					   "Please log in (using, e.g., \"su\") as the "
--- postgresql-8.3-8.3.9.orig/debian/libpq5.install
+++ postgresql-8.3-8.3.9/debian/libpq5.install
@@ -0,0 +1,2 @@
+usr/lib/libpq.so.5*
+usr/share/locale/*/LC_MESSAGES/libpq5.mo
--- postgresql-8.3-8.3.9.orig/debian/postgresql-contrib-8.3.postinst
+++ postgresql-8.3-8.3.9/debian/postgresql-contrib-8.3.postinst
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+VERSION=8.3
+
+. /usr/share/postgresql-common/maintscripts-functions
+
+if [ "$1" = configure ]; then
+    configure_contrib_version $VERSION "$2"
+fi
+
+#DEBHELPER#
--- postgresql-8.3-8.3.9.orig/debian/libpq-dev.install
+++ postgresql-8.3-8.3.9/debian/libpq-dev.install
@@ -0,0 +1,17 @@
+usr/include/postgresql/internal/*
+usr/include/postgresql/libpq-fe.h
+usr/include/postgresql/libpq/libpq-fs.h
+usr/include/postgresql/pg_config*.h
+usr/include/postgresql/postgres_ext.h
+usr/include/postgresql/8.3/server/catalog/pg_type.h /usr/include/postgresql/catalog
+usr/include/postgresql/8.3/server/nodes/nodes.h /usr/include/postgresql/nodes
+usr/include/postgresql/8.3/server/utils/{elog,errcodes,palloc}.h /usr/include/postgresql/utils
+usr/include/postgresql/8.3/server/{c,pg_config,pg_config_manual,pg_config_os,port,pg_trace}.h /usr/include/postgresql/
+usr/include/postgresql/8.3/server/postgres{,_fe,_ext}.h /usr/include/postgresql/
+usr/include/postgresql/8.3/server/mb/pg_wchar.h /usr/include/postgresql/mb
+usr/lib/libpgport.a
+usr/lib/libpq.a
+usr/lib/libpq.so
+usr/lib/postgresql/8.3/bin/pg_config usr/bin
+usr/share/postgresql/8.3/man/man1/pg_config.1
+usr/share/locale/*/LC_MESSAGES/pg_config-8.3.mo
--- postgresql-8.3-8.3.9.orig/debian/copyright
+++ postgresql-8.3-8.3.9/debian/copyright
@@ -0,0 +1,110 @@
+This package was debianized by Martin Pitt <mpitt@debian.org>. 
+
+PostgreSQL was downloaded from ftp://ftp.postgresql.org/mirror/postgresql/src/
+
+Please note that there are many other mirrors, listed on
+http://www.postgresql.org/mirrors-ftp.html.
+
+Copyright.  The following copyright applies to the entire distribution:
+
+  PostgreSQL Data Base Management System
+  (formerly known as Postgres, then as Postgres95).
+  
+  Portions Copyright (c) 1996-2003, The PostgreSQL Global Development Group
+
+  Portions Copyright (c) 1994, The Regents of the University of California
+  
+  Permission to use, copy, modify, and distribute this software and its
+  documentation for any purpose, without fee, and without a written agreement
+  is hereby granted, provided that the above copyright notice and this
+  paragraph and the following two paragraphs appear in all copies.
+  
+  IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+  DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+  LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+  DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+  
+  THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+  AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+  ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
+  PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+
+The following copyright applies to the regex code in the backend
+(src/backend/regex):
+
+  Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
+  
+  Development of this software was funded, in part, by Cray Research Inc.,
+  UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
+  Corporation, none of whom are responsible for the results.  The author
+  thanks all of them. 
+  
+  Redistribution and use in source and binary forms -- with or without
+  modification -- are permitted for any purpose, provided that
+  redistributions in source form retain this entire copyright notice and
+  indicate the origin and nature of any modifications.
+  
+  I'd appreciate being given credit for this package in the documentation
+  of software which uses it, but that is not a requirement.
+  
+  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+  HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PostgreSQL adopted the code out of Tcl 8.4.1.  Portions of regc_locale.c
+and re_syntax.n were developed by Tcl developers other than Henry; these
+files bear the Tcl copyright and license notice:
+
+  This software is copyrighted by the Regents of the University of
+  California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
+  Corporation and other parties.  The following terms apply to all files
+  associated with the software unless explicitly disclaimed in
+  individual files.
+  
+  The authors hereby grant permission to use, copy, modify, distribute,
+  and license this software and its documentation for any purpose, provided
+  that existing copyright notices are retained in all copies and that this
+  notice is included verbatim in any distributions. No written agreement,
+  license, or royalty fee is required for any of the authorized uses.
+  Modifications to this software may be copyrighted by their authors
+  and need not follow the licensing terms described here, provided that
+  the new terms are clearly indicated on the first page of each file where
+  they apply.
+  
+  IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+  FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+  ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+  DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+  
+  THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+  FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
+  IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+  NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+  MODIFICATIONS.
+  
+  GOVERNMENT USE: If you are acquiring this software on behalf of the
+  U.S. government, the Government shall have only "Restricted Rights"
+  in the software and related documentation as defined in the Federal 
+  Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
+  are acquiring the software on behalf of the Department of Defense, the
+  software shall be classified as "Commercial Computer Software" and the
+  Government shall have only "Restricted Rights" as defined in Clause
+  252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
+  authors grant the U.S. Government and others acting in its behalf
+  permission to use and distribute the software in accordance with the
+  terms specified in this license. 
+
+Subsequent modifications to the code by the PostgreSQL project follow
+the same license terms as the rest of PostgreSQL.
--- postgresql-8.3-8.3.9.orig/debian/postgresql-server-dev-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-server-dev-8.3.install
@@ -0,0 +1,3 @@
+usr/include/postgresql/8.3/*
+usr/lib/postgresql/8.3/lib/pgxs/*
+usr/lib/postgresql/8.3/bin/pg_config
--- postgresql-8.3-8.3.9.orig/debian/postgresql-doc-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-doc-8.3.install
@@ -0,0 +1 @@
+usr/share/doc/postgresql-doc-8.3/html/*
--- postgresql-8.3-8.3.9.orig/debian/postgresql-plpython-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-plpython-8.3.install
@@ -0,0 +1 @@
+usr/lib/postgresql/8.3/lib/plpython.so
--- postgresql-8.3-8.3.9.orig/debian/libecpg-dev.install
+++ postgresql-8.3-8.3.9/debian/libecpg-dev.install
@@ -0,0 +1,12 @@
+usr/include/postgresql/ecpg*.h
+usr/include/postgresql/informix/*
+usr/include/postgresql/pgtypes_*.h
+usr/include/postgresql/sql3types.h
+usr/include/postgresql/sqlca.h
+usr/lib/postgresql/8.3/bin/ecpg usr/bin
+usr/lib/libecpg.so
+usr/lib/libecpg_compat.so
+usr/lib/libpgtypes.so
+usr/lib/libecpg.a
+usr/lib/libecpg_compat.a
+usr/lib/libpgtypes.a
--- postgresql-8.3-8.3.9.orig/debian/postgresql-doc-8.3.dirs
+++ postgresql-8.3-8.3.9/debian/postgresql-doc-8.3.dirs
@@ -0,0 +1 @@
+/usr/share/doc/postgresql-doc-8.3/tutorial
--- postgresql-8.3-8.3.9.orig/debian/pycompat
+++ postgresql-8.3-8.3.9/debian/pycompat
@@ -0,0 +1 @@
+2
--- postgresql-8.3-8.3.9.orig/debian/postgresql-8.3.postinst
+++ postgresql-8.3-8.3.9/debian/postgresql-8.3.postinst
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+VERSION=8.3
+
+
+if [ "$1" = configure ]; then
+    # fix init script stop priority on upgrades
+    if dpkg --compare-versions "$2" le-nl "8.3~rc2-1"; then
+        echo "Fixing init script priorities..."
+        for l in 0 1 6; do
+            old=/etc/rc$l.d/K19postgresql-8.3
+            new=/etc/rc$l.d/K21postgresql-8.3
+            if [ -e $old ] && ! [ -e $new ]; then
+                mv $old $new
+            fi
+        done
+    fi
+
+    . /usr/share/postgresql-common/maintscripts-functions
+
+    configure_version $VERSION "$2"
+fi
+
+#DEBHELPER#
--- postgresql-8.3-8.3.9.orig/debian/compat
+++ postgresql-8.3-8.3.9/debian/compat
@@ -0,0 +1 @@
+5
--- postgresql-8.3-8.3.9.orig/debian/postgresql-8.3.links
+++ postgresql-8.3-8.3.9/debian/postgresql-8.3.links
@@ -0,0 +1 @@
+/usr/share/doc/postgresql-common/README.Debian.gz /usr/share/doc/postgresql-8.3/README.Debian.gz
--- postgresql-8.3-8.3.9.orig/debian/postgresql-plperl-8.3.install
+++ postgresql-8.3-8.3.9/debian/postgresql-plperl-8.3.install
@@ -0,0 +1 @@
+usr/lib/postgresql/8.3/lib/plperl.so
--- postgresql-8.3-8.3.9.orig/debian/postgresql-contrib-8.3.prerm
+++ postgresql-8.3-8.3.9/debian/postgresql-contrib-8.3.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+VERSION=8.3
+
+if [ "$1" = remove ]; then
+    . /usr/share/postgresql-common/maintscripts-functions
+    remove_contrib_version $VERSION
+fi
--- postgresql-8.3-8.3.9.orig/debian/libpgtypes3.install
+++ postgresql-8.3-8.3.9/debian/libpgtypes3.install
@@ -0,0 +1 @@
+usr/lib/libpgtypes.so.3*
--- postgresql-8.3-8.3.9.orig/debian/postgresql-8.3.prerm
+++ postgresql-8.3-8.3.9/debian/postgresql-8.3.prerm
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+VERSION=8.3
+
+#DEBHELPER#
+
+if [ "$1" = remove ]; then
+    . /usr/share/postgresql-common/maintscripts-functions
+    remove_version $VERSION
+fi
+
--- postgresql-8.3-8.3.9.orig/debian/postgresql-8.3.init
+++ postgresql-8.3-8.3.9/debian/postgresql-8.3.init
@@ -0,0 +1,55 @@
+#!/bin/sh -e
+
+### BEGIN INIT INFO
+# Provides:		postgresql postgresql-8.3
+# Required-Start:	$local_fs $remote_fs $network $time
+# Required-Stop:	$local_fs $remote_fs $network $time
+# Should-Start:		$syslog
+# Should-Stop:		$syslog
+# Default-Start:	2 3 4 5
+# Default-Stop:		0 1 6
+# Short-Description:	PostgreSQL 8.3 RDBMS server
+### END INIT INFO
+
+# Setting environment variables for the postmaster here does not work; please
+# set them in /etc/postgresql/8.3/<cluster>/environment instead.
+
+[ -r /usr/share/postgresql-common/init.d-functions ] || exit 0
+
+. /usr/share/postgresql-common/init.d-functions
+
+VERSION=8.3
+
+case "$1" in
+    start)
+        start $VERSION
+        ;;
+    stop)
+        stop "$VERSION"
+        ;;
+    restart)
+	restart "$VERSION"
+        ;;
+    force-reload | reload)
+        reload $VERSION
+        ;;
+    status)
+        status $VERSION
+	;;
+    autovac-start)
+	autovac_start $VERSION
+	;;
+    autovac-stop)
+	autovac_stop $VERSION
+	;;
+    autovac-restart)
+	autovac_restart $VERSION
+	;;
+    *)
+        echo "Usage: $0 {start|stop|restart|reload|force-reload|status|autovac-start|autovac-stop|autovac-restart}"
+        exit 1
+        ;;
+esac
+
+exit 0
+
--- postgresql-8.3-8.3.9.orig/debian/libecpg-compat3.install
+++ postgresql-8.3-8.3.9/debian/libecpg-compat3.install
@@ -0,0 +1 @@
+usr/lib/libecpg_compat.so.3*
--- postgresql-8.3-8.3.9.orig/debian/postgresql-client-8.3.prerm
+++ postgresql-8.3-8.3.9/debian/postgresql-client-8.3.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+VERSION=8.3
+
+if [ "$1" = remove ]; then
+    . /usr/share/postgresql-common/maintscripts-functions
+    remove_client_version $VERSION
+fi
--- postgresql-8.3-8.3.9.orig/debian/libpq-dev.manpages
+++ postgresql-8.3-8.3.9/debian/libpq-dev.manpages
@@ -0,0 +1 @@
+debian/tmp/usr/share/postgresql/8.3/man/man1/pg_config.1
--- postgresql-8.3-8.3.9.orig/debian/libpq5.shlibs
+++ postgresql-8.3-8.3.9/debian/libpq5.shlibs
@@ -0,0 +1 @@
+libpq 5 libpq5 (>= 8.3~beta1)
--- postgresql-8.3-8.3.9.orig/debian/patches/05-check-rlimits-nofile.patch
+++ postgresql-8.3-8.3.9/debian/patches/05-check-rlimits-nofile.patch
@@ -0,0 +1,33 @@
+diff -Nur postgresql-8.2/build-tree/postgresql-8.2beta1/src/backend/storage/file/fd.c postgresql-8.2.new/build-tree/postgresql-8.2beta1/src/backend/storage/file/fd.c
+--- postgresql-8.2beta1/src/backend/storage/file/fd.c	2006-08-24 05:15:43.000000000 +0200
++++ postgresql-8.2beta1/src/backend/storage/file/fd.c	2006-09-25 19:19:51.000000000 +0200
+@@ -51,6 +51,7 @@
+ #include "storage/fd.h"
+ #include "storage/ipc.h"
+ 
++#include <sys/resource.h>
+ 
+ /*
+  * We must leave some file descriptors free for system(), the dynamic loader,
+@@ -345,15 +346,21 @@
+ 	int			used = 0;
+ 	int			highestfd = 0;
+ 	int			j;
++ 	struct rlimit	    rlim;
+ 
+ 	size = 1024;
+ 	fd = (int *) palloc(size * sizeof(int));
++ 	getrlimit(RLIMIT_NOFILE, &rlim);
+ 
+ 	/* dup until failure or probe limit reached */
+ 	for (;;)
+ 	{
+ 		int			thisfd;
+ 
++                /* Don't go beyond RLIMIT_NOFILE */
++ 		if (highestfd >= rlim.rlim_cur - 1)
++ 		    break;
++
+ 		thisfd = dup(0);
+ 		if (thisfd < 0)
+ 		{
--- postgresql-8.3-8.3.9.orig/debian/patches/11-pg_regress-socketpath.patch
+++ postgresql-8.3-8.3.9/debian/patches/11-pg_regress-socketpath.patch
@@ -0,0 +1,42 @@
+diff -Nur postgresql-8.3/build-tree/postgresql-8.3beta1/src/test/regress/pg_regress.c postgresql-8.3.new/build-tree/postgresql-8.3beta1/src/test/regress/pg_regress.c
+--- postgresql-8.3beta1/src/test/regress/pg_regress.c	2007-09-09 22:40:54.000000000 +0200
++++ postgresql-8.3beta1/src/test/regress/pg_regress.c	2007-10-09 03:33:53.000000000 +0200
+@@ -859,7 +859,7 @@
+ 
+ 	/* And now we can build and execute the shell command */
+ 	snprintf(psql_cmd, sizeof(psql_cmd),
+-			 SYSTEMQUOTE "\"%s%spsql\" -X -c \"%s\" \"%s\"" SYSTEMQUOTE,
++			 SYSTEMQUOTE "\"%s%spsql\" -h /tmp -X -c \"%s\" \"%s\"" SYSTEMQUOTE,
+ 			 psqldir ? psqldir : "",
+ 			 psqldir ? "/" : "",
+ 			 query_escaped,
+@@ -1999,7 +1999,7 @@
+ 		 */
+ 		header(_("starting postmaster"));
+ 		snprintf(buf, sizeof(buf),
+-				 SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE,
++				 SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" -k /tmp -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE,
+ 				 bindir, temp_install,
+ 				 debug ? " -d 5" : "",
+ 				 hostname ? hostname : "",
+@@ -2018,7 +2018,7 @@
+ 		 * forever, however.
+ 		 */
+ 		snprintf(buf, sizeof(buf),
+-				 SYSTEMQUOTE "\"%s/psql\" -X postgres <%s 2>%s" SYSTEMQUOTE,
++				 SYSTEMQUOTE "\"%s/psql\" -h /tmp -X postgres <%s 2>%s" SYSTEMQUOTE,
+ 				 bindir, DEVNULL, DEVNULL);
+ 		for (i = 0; i < 60; i++)
+ 		{
+diff -Nur postgresql-8.3/build-tree/postgresql-8.3beta1/src/test/regress/pg_regress_main.c postgresql-8.3.new/build-tree/postgresql-8.3beta1/src/test/regress/pg_regress_main.c
+--- postgresql-8.3beta1/src/test/regress/pg_regress_main.c	2007-06-12 13:07:34.000000000 +0200
++++ postgresql-8.3beta1/src/test/regress/pg_regress_main.c	2007-10-09 03:34:17.000000000 +0200
+@@ -45,7 +45,7 @@
+ 	add_stringlist_item(expectfiles, expectfile);
+ 
+ 	snprintf(psql_cmd, sizeof(psql_cmd),
+-			 SYSTEMQUOTE "\"%s%spsql\" -X -a -q -d \"%s\" < \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
++			 SYSTEMQUOTE "\"%s%spsql\" -h /tmp -X -a -q -d \"%s\" < \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
+ 			 psqldir ? psqldir : "",
+ 			 psqldir ? "/" : "",
+ 			 dblist->str,
--- postgresql-8.3-8.3.9.orig/debian/patches/12-psql-sensible-editor.patch
+++ postgresql-8.3-8.3.9/debian/patches/12-psql-sensible-editor.patch
@@ -0,0 +1,11 @@
+--- postgresql-8.3beta3/src/bin/psql/settings.h	2007-01-05 23:19:49.000000000 +0100
++++ postgresql-8.3beta3/src/bin/psql/settings.h	2007-11-21 17:10:38.000000000 +0100
+@@ -19,7 +19,7 @@
+ #if defined(WIN32) || defined(__CYGWIN__)
+ #define DEFAULT_EDITOR	"notepad.exe"
+ #else
+-#define DEFAULT_EDITOR	"vi"
++#define DEFAULT_EDITOR	"sensible-editor"
+ #endif
+ 
+ #define DEFAULT_PROMPT1 "%/%R%# "
--- postgresql-8.3-8.3.9.orig/debian/patches/01-build-contrib.patch
+++ postgresql-8.3-8.3.9/debian/patches/01-build-contrib.patch
@@ -0,0 +1,25 @@
+diff -Nur postgresql-8.2/build-tree/postgresql-8.2beta1/GNUmakefile.in postgresql-8.2.new/build-tree/postgresql-8.2beta1/GNUmakefile.in
+--- postgresql-8.2beta1/GNUmakefile.in	2006-08-18 21:58:05.000000000 +0200
++++ postgresql-8.2beta1/GNUmakefile.in	2006-09-25 19:15:34.000000000 +0200
+@@ -12,18 +14,21 @@
+ 	$(MAKE) -C doc all
+ 	$(MAKE) -C src all
+ 	$(MAKE) -C config all
++	$(MAKE) -C contrib all
+ 	@echo "All of PostgreSQL successfully made. Ready to install."
+ 
+ install:
+ 	$(MAKE) -C doc $@
+ 	$(MAKE) -C src $@
+ 	$(MAKE) -C config $@
++	$(MAKE) -C contrib $@
+ 	@echo "PostgreSQL installation complete."
+ 
+ installdirs uninstall:
+ 	$(MAKE) -C doc $@
+ 	$(MAKE) -C src $@
+ 	$(MAKE) -C config $@
++	$(MAKE) -C contrib $@
+ 
+ distprep:
+ 	$(MAKE) -C doc $@
--- postgresql-8.3-8.3.9.orig/debian/patches/07-relax-sslkey-permscheck.patch
+++ postgresql-8.3-8.3.9/debian/patches/07-relax-sslkey-permscheck.patch
@@ -0,0 +1,22 @@
+diff -Nur postgresql-8.2/build-tree/postgresql-8.2beta1/src/backend/libpq/be-secure.c postgresql-8.2.new/build-tree/postgresql-8.2beta1/src/backend/libpq/be-secure.c
+--- postgresql-8.2beta1/src/backend/libpq/be-secure.c	2006-09-04 16:57:27.000000000 +0200
++++ postgresql-8.2beta1/src/backend/libpq/be-secure.c	2006-09-25 19:24:13.000000000 +0200
+@@ -751,13 +751,15 @@
+ 		 * directory permission check in postmaster.c)
+ 		 */
+ #if !defined(WIN32) && !defined(__CYGWIN__)
+-		if (!S_ISREG(buf.st_mode) || (buf.st_mode & (S_IRWXG | S_IRWXO)) ||
+-			buf.st_uid != geteuid())
++		if (!S_ISREG(buf.st_mode) || (buf.st_mode & (S_IWGRP | S_IRWXO)) ||
++			(buf.st_uid != geteuid()) && buf.st_uid != 0)
+ 			ereport(FATAL,
+ 					(errcode(ERRCODE_CONFIG_FILE_ERROR),
+ 					 errmsg("unsafe permissions on private key file \"%s\"",
+ 							SERVER_PRIVATE_KEY_FILE),
+-					 errdetail("File must be owned by the database user and must have no permissions for \"group\" or \"other\".")));
++					 errdetail("File must be owned by the \
++database user or root, must have no write permission for \"group\", and must \
++have no permissions for \"other\".")));
+ #endif
+ 
+ 		if (!SSL_CTX_use_PrivateKey_file(SSL_context,
--- postgresql-8.3-8.3.9.orig/debian/patches/09-server-includedir.patch
+++ postgresql-8.3-8.3.9/debian/patches/09-server-includedir.patch
@@ -0,0 +1,12 @@
+diff -ruN postgresql-8.2.0-old/src/Makefile.global.in postgresql-8.2.0/src/Makefile.global.in
+--- postgresql-8.2.0-old/src/Makefile.global.in	2005-11-05 18:54:55.000000000 -0500
++++ postgresql-8.2.0/src/Makefile.global.in	2005-11-05 18:55:59.000000000 -0500
+@@ -133,7 +133,7 @@
+ 
+ # These derived path variables aren't separately configurable.
+ 
+-includedir_server = $(pkgincludedir)/server
++includedir_server = $(pkgincludedir)/8.3/server
+ includedir_internal = $(pkgincludedir)/internal
+ pgxsdir = $(pkglibdir)/pgxs
+ 
--- postgresql-8.3-8.3.9.orig/debian/patches/02-pager.patch
+++ postgresql-8.3-8.3.9/debian/patches/02-pager.patch
@@ -0,0 +1,12 @@
+diff -Nur postgresql-8.2/build-tree/postgresql-8.2beta1/src/bin/psql/print.h postgresql-8.2.new/build-tree/postgresql-8.2beta1/src/bin/psql/print.h
+--- postgresql-8.2beta1/src/bin/psql/print.h	2006-08-30 00:25:07.000000000 +0200
++++ postgresql-8.2beta1/src/bin/psql/print.h	2006-09-25 19:18:54.000000000 +0200
+@@ -89,7 +89,7 @@
+ void		setDecimalLocale(void);
+ 
+ #ifndef __CYGWIN__
+-#define DEFAULT_PAGER "more"
++#define DEFAULT_PAGER "/usr/bin/pager"
+ #else
+ #define DEFAULT_PAGER "less"
+ #endif
--- postgresql-8.3-8.3.9.orig/debian/patches/03-gettext-domains.patch
+++ postgresql-8.3-8.3.9/debian/patches/03-gettext-domains.patch
@@ -0,0 +1,340 @@
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/backend/main/main.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/backend/main/main.c
+--- postgresql-8.3.5/src/backend/main/main.c	2008-01-01 20:45:49.000000000 +0100
++++ postgresql-8.3.5/src/backend/main/main.c	2008-10-31 19:32:48.000000000 +0100
+@@ -87,7 +87,7 @@
+ 	 * error messages to be localized.
+ 	 */
+ 
+-	set_pglocale_pgservice(argv[0], "postgres");
++	set_pglocale_pgservice(argv[0], "postgres-8.3");
+ 
+ #ifdef WIN32
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/backend/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/backend/nls.mk
+--- postgresql-8.3.5/src/backend/nls.mk	2008-10-27 20:37:28.000000000 +0100
++++ postgresql-8.3.5/src/backend/nls.mk	2008-10-31 19:33:10.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/backend/nls.mk,v 1.21.2.2 2008/10/27 19:37:28 tgl Exp $
+-CATALOG_NAME	:= postgres
++CATALOG_NAME	:= postgres-8.3
+ AVAIL_LANGUAGES	:= af cs de es fr hr hu it ko nb nl pl pt_BR ro ru sk sl sv tr zh_CN zh_TW
+ GETTEXT_FILES	:= + gettext-files
+ GETTEXT_TRIGGERS:= _ errmsg errdetail errhint errcontext write_stderr yyerror
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/initdb/initdb.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/initdb/initdb.c
+--- postgresql-8.3.5/src/bin/initdb/initdb.c	2008-10-30 09:51:13.000000000 +0100
++++ postgresql-8.3.5/src/bin/initdb/initdb.c	2008-10-31 19:32:48.000000000 +0100
+@@ -2456,7 +2456,7 @@
+ 	};
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "initdb");
++	set_pglocale_pgservice(argv[0], "initdb-8.3");
+ 
+ 	if (argc > 1)
+ 	{
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/initdb/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/initdb/nls.mk
+--- postgresql-8.3.5/src/bin/initdb/nls.mk	2007-10-27 02:13:42.000000000 +0200
++++ postgresql-8.3.5/src/bin/initdb/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/initdb/nls.mk,v 1.19 2007/10/27 00:13:42 petere Exp $
+-CATALOG_NAME	:= initdb
++CATALOG_NAME	:= initdb-8.3
+ AVAIL_LANGUAGES	:= cs de es fr it ko pl pt_BR ro ru sk sl sv ta tr zh_CN zh_TW
+ GETTEXT_FILES	:= initdb.c ../../port/dirmod.c ../../port/exec.c
+ GETTEXT_TRIGGERS:= _ simple_prompt
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_config/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_config/nls.mk
+--- postgresql-8.3.5/src/bin/pg_config/nls.mk	2007-11-15 21:38:15.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_config/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/pg_config/nls.mk,v 1.17 2007/11/15 20:38:15 petere Exp $
+-CATALOG_NAME	:= pg_config
++CATALOG_NAME	:= pg_config-8.3
+ AVAIL_LANGUAGES	:= cs de es fr ko nb pl pt_BR ro ru sl sv ta tr zh_CN zh_TW
+ GETTEXT_FILES	:= pg_config.c ../../port/exec.c
+ GETTEXT_TRIGGERS:= _
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_config/pg_config.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_config/pg_config.c
+--- postgresql-8.3.5/src/bin/pg_config/pg_config.c	2008-01-01 20:45:55.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_config/pg_config.c	2008-10-31 19:32:49.000000000 +0100
+@@ -451,7 +451,7 @@
+ 	int			j;
+ 	int			ret;
+ 
+-	set_pglocale_pgservice(argv[0], "pg_config");
++	set_pglocale_pgservice(argv[0], "pg_config-8.3");
+ 
+ 	progname = get_progname(argv[0]);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_controldata/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_controldata/nls.mk
+--- postgresql-8.3.5/src/bin/pg_controldata/nls.mk	2007-11-15 21:38:15.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_controldata/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/pg_controldata/nls.mk,v 1.17 2007/11/15 20:38:15 petere Exp $
+-CATALOG_NAME	:= pg_controldata
++CATALOG_NAME	:= pg_controldata-8.3
+ AVAIL_LANGUAGES	:= cs de es fa fr hu it ko nb pl pt_BR ro ru sk sl sv ta tr zh_CN zh_TW
+ GETTEXT_FILES	:= pg_controldata.c
+ GETTEXT_TRIGGERS:= _
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_controldata/pg_controldata.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_controldata/pg_controldata.c
+--- postgresql-8.3.5/src/bin/pg_controldata/pg_controldata.c	2008-09-24 10:59:46.000000000 +0200
++++ postgresql-8.3.5/src/bin/pg_controldata/pg_controldata.c	2008-10-31 19:32:49.000000000 +0100
+@@ -75,7 +75,7 @@
+ 	const char *strftime_fmt = "%c";
+ 	const char *progname;
+ 
+-	set_pglocale_pgservice(argv[0], "pg_controldata");
++	set_pglocale_pgservice(argv[0], "pg_controldata-8.3");
+ 
+ 	progname = get_progname(argv[0]);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_ctl/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_ctl/nls.mk
+--- postgresql-8.3.5/src/bin/pg_ctl/nls.mk	2007-11-15 21:38:15.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_ctl/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/pg_ctl/nls.mk,v 1.16 2007/11/15 20:38:15 petere Exp $
+-CATALOG_NAME	:= pg_ctl
++CATALOG_NAME	:= pg_ctl-8.3
+ AVAIL_LANGUAGES	:= cs de es fr ko pt_BR ro ru sk sl sv ta tr zh_CN zh_TW
+ GETTEXT_FILES	:= pg_ctl.c ../../port/exec.c
+ GETTEXT_TRIGGERS:= _ simple_prompt
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_ctl/pg_ctl.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_ctl/pg_ctl.c
+--- postgresql-8.3.5/src/bin/pg_ctl/pg_ctl.c	2008-09-30 15:14:07.000000000 +0200
++++ postgresql-8.3.5/src/bin/pg_ctl/pg_ctl.c	2008-10-31 19:32:49.000000000 +0100
+@@ -1651,7 +1651,7 @@
+ #endif
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pg_ctl");
++	set_pglocale_pgservice(argv[0], "pg_ctl-8.3");
+ 
+ 	/*
+ 	 * save argv[0] so do_start() can look for the postmaster if necessary. we
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_dump/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_dump/nls.mk
+--- postgresql-8.3.5/src/bin/pg_dump/nls.mk	2005-01-25 18:32:00.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_dump/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/pg_dump/nls.mk,v 1.19 2005/01/25 17:32:00 petere Exp $
+-CATALOG_NAME	:= pg_dump
++CATALOG_NAME	:= pg_dump-8.3
+ AVAIL_LANGUAGES	:= cs de es fr it ko nb pt_BR ro ru sk sl sv tr zh_CN zh_TW
+ GETTEXT_FILES	:= pg_dump.c common.c pg_backup_archiver.c pg_backup_custom.c \
+                    pg_backup_db.c pg_backup_files.c pg_backup_null.c \
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_dump/pg_dumpall.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_dump/pg_dumpall.c
+--- postgresql-8.3.5/src/bin/pg_dump/pg_dumpall.c	2008-01-01 20:45:55.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_dump/pg_dumpall.c	2008-10-31 19:32:49.000000000 +0100
+@@ -125,7 +125,7 @@
+ 
+ 	int			optindex;
+ 
+-	set_pglocale_pgservice(argv[0], "pg_dump");
++	set_pglocale_pgservice(argv[0], "pg_dump-8.3");
+ 
+ 	progname = get_progname(argv[0]);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_dump/pg_dump.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_dump/pg_dump.c
+--- postgresql-8.3.5/src/bin/pg_dump/pg_dump.c	2008-01-30 19:35:55.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_dump/pg_dump.c	2008-10-31 19:32:49.000000000 +0100
+@@ -272,7 +272,7 @@
+ 	};
+ 	int			optindex;
+ 
+-	set_pglocale_pgservice(argv[0], "pg_dump");
++	set_pglocale_pgservice(argv[0], "pg_dump-8.3");
+ 
+ 	g_verbose = false;
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_dump/pg_restore.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_dump/pg_restore.c
+--- postgresql-8.3.5/src/bin/pg_dump/pg_restore.c	2007-12-11 20:01:06.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_dump/pg_restore.c	2008-10-31 19:32:49.000000000 +0100
+@@ -117,7 +117,7 @@
+ 		{NULL, 0, NULL, 0}
+ 	};
+ 
+-	set_pglocale_pgservice(argv[0], "pg_dump");
++	set_pglocale_pgservice(argv[0], "pg_dump-8.3");
+ 
+ 	opts = NewRestoreOptions();
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_resetxlog/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_resetxlog/nls.mk
+--- postgresql-8.3.5/src/bin/pg_resetxlog/nls.mk	2007-11-15 21:38:15.000000000 +0100
++++ postgresql-8.3.5/src/bin/pg_resetxlog/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/pg_resetxlog/nls.mk,v 1.18 2007/11/15 20:38:15 petere Exp $
+-CATALOG_NAME	:= pg_resetxlog
++CATALOG_NAME	:= pg_resetxlog-8.3
+ AVAIL_LANGUAGES	:= cs de es fr hu it ko nb pt_BR ro ru sk sl sv ta tr zh_CN zh_TW
+ GETTEXT_FILES	:= pg_resetxlog.c
+ GETTEXT_TRIGGERS:= _
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/pg_resetxlog/pg_resetxlog.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/pg_resetxlog/pg_resetxlog.c
+--- postgresql-8.3.5/src/bin/pg_resetxlog/pg_resetxlog.c	2008-09-24 10:59:46.000000000 +0200
++++ postgresql-8.3.5/src/bin/pg_resetxlog/pg_resetxlog.c	2008-10-31 19:32:49.000000000 +0100
+@@ -88,7 +88,7 @@
+ 	int			fd;
+ 	char		path[MAXPGPATH];
+ 
+-	set_pglocale_pgservice(argv[0], "pg_resetxlog");
++	set_pglocale_pgservice(argv[0], "pg_resetxlog-8.3");
+ 
+ 	progname = get_progname(argv[0]);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/psql/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/psql/nls.mk
+--- postgresql-8.3.5/src/bin/psql/nls.mk	2004-12-13 17:30:48.000000000 +0100
++++ postgresql-8.3.5/src/bin/psql/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/psql/nls.mk,v 1.21 2004/12/13 16:30:48 petere Exp $
+-CATALOG_NAME	:= psql
++CATALOG_NAME	:= psql-8.3
+ AVAIL_LANGUAGES	:= cs de es fa fr hu it ko nb pt_BR ro ru sk sl sv tr zh_CN zh_TW
+ GETTEXT_FILES	:= command.c common.c copy.c help.c input.c large_obj.c \
+                    mainloop.c print.c startup.c describe.c sql_help.h \
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/psql/startup.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/psql/startup.c
+--- postgresql-8.3.5/src/bin/psql/startup.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/psql/startup.c	2008-10-31 19:32:49.000000000 +0100
+@@ -108,7 +108,7 @@
+ 	char	   *password_prompt = NULL;
+ 	bool		new_pass;
+ 
+-	set_pglocale_pgservice(argv[0], "psql");
++	set_pglocale_pgservice(argv[0], "psql-8.3");
+ 
+ 	if (argc > 1)
+ 	{
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/clusterdb.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/clusterdb.c
+--- postgresql-8.3.5/src/bin/scripts/clusterdb.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/clusterdb.c	2008-10-31 19:32:49.000000000 +0100
+@@ -56,7 +56,7 @@
+ 	char	   *table = NULL;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "clusterdb", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/createdb.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/createdb.c
+--- postgresql-8.3.5/src/bin/scripts/createdb.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/createdb.c	2008-10-31 19:32:49.000000000 +0100
+@@ -57,7 +57,7 @@
+ 	PGresult   *result;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "createdb", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/createlang.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/createlang.c
+--- postgresql-8.3.5/src/bin/scripts/createlang.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/createlang.c	2008-10-31 19:32:49.000000000 +0100
+@@ -52,7 +52,7 @@
+ 	PGresult   *result;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "createlang", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/createuser.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/createuser.c
+--- postgresql-8.3.5/src/bin/scripts/createuser.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/createuser.c	2008-10-31 19:32:49.000000000 +0100
+@@ -81,7 +81,7 @@
+ 	PGresult   *result;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "createuser", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/dropdb.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/dropdb.c
+--- postgresql-8.3.5/src/bin/scripts/dropdb.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/dropdb.c	2008-10-31 19:32:49.000000000 +0100
+@@ -50,7 +50,7 @@
+ 	PGresult   *result;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "dropdb", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/droplang.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/droplang.c
+--- postgresql-8.3.5/src/bin/scripts/droplang.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/droplang.c	2008-10-31 19:32:49.000000000 +0100
+@@ -63,7 +63,7 @@
+ 	PGresult   *result;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "droplang", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/dropuser.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/dropuser.c
+--- postgresql-8.3.5/src/bin/scripts/dropuser.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/dropuser.c	2008-10-31 19:32:49.000000000 +0100
+@@ -50,7 +50,7 @@
+ 	PGresult   *result;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "dropuser", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/nls.mk
+--- postgresql-8.3.5/src/bin/scripts/nls.mk	2007-11-29 09:50:35.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/bin/scripts/nls.mk,v 1.21 2007/11/29 08:50:35 petere Exp $
+-CATALOG_NAME    := pgscripts
++CATALOG_NAME    := pgscripts-8.3
+ AVAIL_LANGUAGES := cs de es fr it ko pt_BR ro ru sk sl sv ta tr zh_CN zh_TW
+ GETTEXT_FILES   := createdb.c createlang.c createuser.c \
+                    dropdb.c droplang.c dropuser.c \
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/reindexdb.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/reindexdb.c
+--- postgresql-8.3.5/src/bin/scripts/reindexdb.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/reindexdb.c	2008-10-31 19:32:49.000000000 +0100
+@@ -64,7 +64,7 @@
+ 	const char *index = NULL;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "reindexdb", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/bin/scripts/vacuumdb.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/bin/scripts/vacuumdb.c
+--- postgresql-8.3.5/src/bin/scripts/vacuumdb.c	2008-01-01 20:45:56.000000000 +0100
++++ postgresql-8.3.5/src/bin/scripts/vacuumdb.c	2008-10-31 19:32:49.000000000 +0100
+@@ -64,7 +64,7 @@
+ 	bool		verbose = false;
+ 
+ 	progname = get_progname(argv[0]);
+-	set_pglocale_pgservice(argv[0], "pgscripts");
++	set_pglocale_pgservice(argv[0], "pgscripts-8.3");
+ 
+ 	handle_help_version_opts(argc, argv, "vacuumdb", help);
+ 
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/interfaces/libpq/fe-misc.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/interfaces/libpq/fe-misc.c
+--- postgresql-8.3.5/src/interfaces/libpq/fe-misc.c	2008-08-20 13:53:51.000000000 +0200
++++ postgresql-8.3.5/src/interfaces/libpq/fe-misc.c	2008-10-31 19:32:49.000000000 +0100
+@@ -1152,7 +1152,7 @@
+ 		ldir = getenv("PGLOCALEDIR");
+ 		if (!ldir)
+ 			ldir = LOCALEDIR;
+-		bindtextdomain("libpq", ldir);
++		bindtextdomain("libpq5", ldir);
+ #ifdef WIN32
+ 		SetLastError(save_errno);
+ #else
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/interfaces/libpq/nls.mk postgresql-8.3.new/build-tree/postgresql-8.3.5/src/interfaces/libpq/nls.mk
+--- postgresql-8.3.5/src/interfaces/libpq/nls.mk	2007-10-27 02:13:43.000000000 +0200
++++ postgresql-8.3.5/src/interfaces/libpq/nls.mk	2008-10-31 19:32:49.000000000 +0100
+@@ -1,5 +1,5 @@
+ # $PostgreSQL: pgsql/src/interfaces/libpq/nls.mk,v 1.21 2007/10/27 00:13:43 petere Exp $
+-CATALOG_NAME	:= libpq
++CATALOG_NAME	:= libpq5
+ AVAIL_LANGUAGES	:= af cs de es fr hr it ko nb pl pt_BR ru sk sl sv ta tr zh_CN zh_TW
+ GETTEXT_FILES	:= fe-auth.c fe-connect.c fe-exec.c fe-lobj.c fe-misc.c fe-protocol2.c fe-protocol3.c fe-secure.c
+ GETTEXT_TRIGGERS:= libpq_gettext pqInternalNotice:2
--- postgresql-8.3-8.3.9.orig/debian/patches/10-tutorial-README.patch
+++ postgresql-8.3-8.3.9/debian/patches/10-tutorial-README.patch
@@ -0,0 +1,13 @@
+diff -ruN postgresql-8.2.3-old/src/tutorial/README postgresql-8.2.3/src/tutorial/README
+--- postgresql-8.2.3-old/src/tutorial/README	2001-10-26 22:45:33.000000000 +0200
++++ postgresql-8.2.3/src/tutorial/README	2006-04-10 22:17:29.000000000 +0200
+@@ -1,8 +1,7 @@
+ This directory contains SQL tutorial scripts.  To look at them, first do a
+ 	% make
+ to compile all the scripts and C files for the user-defined functions
+-and types.  (make needs to be GNU make --- it may be named something
+-different on your system, often gmake)
++and types. This requires postgresql-server-dev-8.3 to be installed.
+ 
+ Then, run psql with the -s (single-step) flag:
+ 	% psql -s
--- postgresql-8.3-8.3.9.orig/debian/patches/04-psql-passwordprompt.patch
+++ postgresql-8.3-8.3.9/debian/patches/04-psql-passwordprompt.patch
@@ -0,0 +1,12 @@
+# Description: Change psql to not prompt for a password if PGPASSWORD is given, just as in earlier versions. Without that, there is no way to suppress the password input prompt, which is bad for scripts.
+--- postgresql-8.3RC1/src/bin/psql/startup.c	2008-01-04 14:48:17.000000000 +0100
++++ postgresql-8.3RC1/src/bin/psql/startup.c	2008-01-04 14:49:24.000000000 +0100
+@@ -199,7 +199,7 @@
+ 
+ 		if (PQstatus(pset.db) == CONNECTION_BAD &&
+ 			PQconnectionNeedsPassword(pset.db) &&
+-			password == NULL &&
++			password == NULL && !getenv("PGPASSWORD") &&
+ 			!feof(stdin))
+ 		{
+ 			PQfinish(pset.db);
--- postgresql-8.3-8.3.9.orig/debian/patches/14-pg_config-paths.patch
+++ postgresql-8.3-8.3.9/debian/patches/14-pg_config-paths.patch
@@ -0,0 +1,27 @@
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.0/src/bin/pg_config/pg_config.c postgresql-8.3.new/build-tree/postgresql-8.3.0/src/bin/pg_config/pg_config.c
+--- postgresql-8.3.0/src/bin/pg_config/pg_config.c	2008-02-03 12:12:01.000000000 +0100
++++ postgresql-8.3.0/src/bin/pg_config/pg_config.c	2008-02-03 12:13:09.000000000 +0100
+@@ -26,6 +26,8 @@
+ 
+ #include "port.h"
+ 
++#include "../port/pg_config_paths.h"
++
+ static const char *progname;
+ static char mypath[MAXPGPATH];
+ 
+@@ -465,13 +467,7 @@
+ 		}
+ 	}
+ 
+-	ret = find_my_exec(argv[0], mypath);
+-
+-	if (ret)
+-	{
+-		fprintf(stderr, _("%s: could not find own program executable\n"), progname);
+-		exit(1);
+-	}
++	snprintf(mypath, sizeof(mypath), "%s/%s", PGBINDIR, progname);
+ 
+ 	/* no arguments -> print everything */
+ 	if (argc < 2)
--- postgresql-8.3-8.3.9.orig/debian/patches/08-pkglibdir.patch
+++ postgresql-8.3-8.3.9/debian/patches/08-pkglibdir.patch
@@ -0,0 +1,12 @@
+diff -ruN postgresql-8.2beta4-old/src/Makefile.global.in postgresql-8.2beta4/src/Makefile.global.in
+--- postgresql-8.2beta4-old/src/Makefile.global.in	2005-09-27 18:39:32.000000000 +0100
++++ postgresql-8.2beta4/src/Makefile.global.in	2005-10-26 20:40:52.000000000 +0100
+@@ -89,7 +89,7 @@
+ pkglibdir = $(libdir)
+ ifeq "$(findstring pgsql, $(pkglibdir))" ""
+ ifeq "$(findstring postgres, $(pkglibdir))" ""
+-override pkglibdir := $(pkglibdir)/postgresql
++override pkglibdir := $(pkglibdir)/postgresql/8.3/lib
+ endif
+ endif
+ 
--- postgresql-8.3-8.3.9.orig/debian/patches/15-dict-fallback-dir.patch
+++ postgresql-8.3-8.3.9/debian/patches/15-dict-fallback-dir.patch
@@ -0,0 +1,44 @@
+# Description: If a tsearch/stem dictionary is not found in sharedir/tsearch_data/ll_cc.{dict,affix}, fall back to sharedir/tsearch_data/system_ll_cc.{dict,affix}, where postgresql-common creates them from system directories.
+# Ubuntu: https://launchpad.net/bugs/301770
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/backend/tsearch/ts_utils.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/backend/tsearch/ts_utils.c
+--- postgresql-8.3.5/src/backend/tsearch/ts_utils.c	2008-06-19 09:52:31.000000000 -0700
++++ postgresql-8.3.5/src/backend/tsearch/ts_utils.c	2008-12-05 12:48:02.000000000 -0800
+@@ -15,6 +15,7 @@
+ #include "postgres.h"
+ 
+ #include <ctype.h>
++#include <unistd.h>
+ 
+ #include "miscadmin.h"
+ #include "tsearch/ts_locale.h"
+@@ -36,7 +37,7 @@
+ 							const char *extension)
+ {
+ 	char		sharepath[MAXPGPATH];
+-	char	   *result;
++	char	   *result, *system_result;
+ 
+ 	/*
+ 	 * We limit the basename to contain a-z, 0-9, and underscores.	This may
+@@ -58,6 +59,21 @@
+ 	snprintf(result, MAXPGPATH, "%s/tsearch_data/%s.%s",
+ 			 sharepath, basename, extension);
+ 
++	/* fall back to a system-supplied one */
++	if (access(result, R_OK) != 0)
++	{
++		system_result = palloc(MAXPGPATH);
++		snprintf(system_result, MAXPGPATH, "%s/tsearch_data/system_%s.%s",
++			 sharepath, basename, extension);
++		if (access(system_result, R_OK) == 0)
++		{
++			pfree(result);
++			result = system_result;
++		} 
++		else
++			pfree(system_result);
++	}
++
+ 	return result;
+ }
+ 
--- postgresql-8.3-8.3.9.orig/debian/patches/13-pg_service.conf_directory_doc.patch
+++ postgresql-8.3-8.3.9/debian/patches/13-pg_service.conf_directory_doc.patch
@@ -0,0 +1,14 @@
+diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3RC2/src/interfaces/libpq/pg_service.conf.sample postgresql-8.3.new/build-tree/postgresql-8.3RC2/src/interfaces/libpq/pg_service.conf.sample
+--- postgresql-8.3RC2/src/interfaces/libpq/pg_service.conf.sample	2007-09-14 16:31:22.000000000 +0200
++++ postgresql-8.3RC2/src/interfaces/libpq/pg_service.conf.sample	2008-01-19 17:24:45.000000000 +0100
+@@ -8,8 +8,8 @@
+ # to look up such parameters.  A sample configuration for postgres is 
+ # included in this file.  Lines beginning with '#' are comments.
+ #
+-# Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and
+-# rename it pg_service.conf.
++# Copy this to /etc/postgresql-common/ (or select its location with the
++# PGSYSCONFDIR environment variable) and rename it pg_service.conf.
+ #
+ #
+ #[postgres]
--- postgresql-8.3-8.3.9.orig/debian/patches/06-libpq-defaultsocketdir.patch
+++ postgresql-8.3-8.3.9/debian/patches/06-libpq-defaultsocketdir.patch
@@ -0,0 +1,12 @@
+diff -ruN postgresql-8.2.3-old/src/include/pg_config_manual.h postgresql-8.2.3/src/include/pg_config_manual.h
+--- postgresql-8.2.3-old/src/include/pg_config_manual.h	2004-09-10 16:27:37.000000000 +0200
++++ postgresql-8.2.3/src/include/pg_config_manual.h	2005-06-14 19:21:28.200000000 +0200
+@@ -160,7 +160,7 @@
+  * here's where to twiddle it.  You can also override this at runtime
+  * with the postmaster's -k switch.
+  */
+-#define DEFAULT_PGSOCKET_DIR  "/tmp"
++#define DEFAULT_PGSOCKET_DIR  "/var/run/postgresql"
+ 
+ /*
+  * The random() function is expected to yield values between 0 and
