#!/bin/sh
args=$*
[ -f $PGHOST/STOP ] && exit 1; # Mimic a connection failure
while [ $# -gt 0 ]; do
	case "$1" in
		-V) echo "psql (PostgreSQL) 12.0"; exit 0 ;;
		-c) echo "1"; shift ;; # result of 'SELECT 1'
	esac
	shift
done
>&2 echo $(basename $0) $args
