#!/bin/sh
# to_multi_byte needs English, and UTF-8
export LC_ALL=en_US.utf8
set -e
for v in $(pg_buildext supported-versions); do
case $v in
# older versions fail on concat, ignore that
# ERROR: function concat(unknown, unknown) does not exist
8*|9.0) FAIL="true" ;;
*) FAIL="false" ;;
esac
rm -f orafunc.sql
make orafunc.sql PG_CONFIG=/usr/lib/postgresql/$v/bin/pg_config
pg_buildext installcheck-$v || $FAIL
done