mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
In pg_upgrade cross-version test, handle lack of oldstyle_length().
This suffices for testing v12 -> v13; some other version pairs need more changes. Back-patch to v10, which removed the function.
This commit is contained in:
parent
5253906fac
commit
239213684d
@ -169,17 +169,17 @@ createdb "regression$dbname3" || createdb_status=$?
|
|||||||
if "$MAKE" -C "$oldsrc" installcheck-parallel; then
|
if "$MAKE" -C "$oldsrc" installcheck-parallel; then
|
||||||
oldpgversion=`psql -X -A -t -d regression -c "SHOW server_version_num"`
|
oldpgversion=`psql -X -A -t -d regression -c "SHOW server_version_num"`
|
||||||
|
|
||||||
# before dumping, get rid of objects not existing in later versions
|
# before dumping, get rid of objects not feasible in later versions
|
||||||
if [ "$newsrc" != "$oldsrc" ]; then
|
if [ "$newsrc" != "$oldsrc" ]; then
|
||||||
fix_sql=""
|
fix_sql=""
|
||||||
case $oldpgversion in
|
case $oldpgversion in
|
||||||
804??)
|
804??)
|
||||||
fix_sql="DROP FUNCTION public.myfunc(integer); DROP FUNCTION public.oldstyle_length(integer, text);"
|
fix_sql="DROP FUNCTION public.myfunc(integer);"
|
||||||
;;
|
|
||||||
*)
|
|
||||||
fix_sql="DROP FUNCTION public.oldstyle_length(integer, text);"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fix_sql="$fix_sql
|
||||||
|
DROP FUNCTION IF EXISTS
|
||||||
|
public.oldstyle_length(integer, text); -- last in 9.6";
|
||||||
psql -X -d regression -c "$fix_sql;" || psql_fix_sql_status=$?
|
psql -X -d regression -c "$fix_sql;" || psql_fix_sql_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user