#! /bin/bash
#include <genscript.warning>

#include <prerm.inc>

if [ "$1" != failed-upgrade ]
then

	# Save the necessary binaries to pg_dumpall, in case an upgrade is
	# insufficient
	save_bins || echo Could not save binaries for dumping current database

fi

if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/postgresql-client ]
then
   rm /usr/doc/postgresql-client
fi
#DEBHELPER#
