This file is indexed.

preinst is in postgresql-9.3 9.3.4-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#!/bin/sh
set -e

# DB format changed between beta 1 and 2
if [ "$1" = "upgrade" ] || [ "$1" = "install" ] && \
	dpkg --compare-versions "$2" lt-nl "9.3~beta2"; then
    if pg_lsclusters -h | grep -q '^9.3'; then
	echo "ERROR: The database format changed between beta 1 and 2. Please dump your 9.3 clusters first and remove them, before attempting to upgrade the package." >&2
	exit 1
    fi
fi



exit 0