diff options
author | Noah Misch <noah@leadboat.com> | 2020-12-30 01:43:43 -0800 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2020-12-30 01:43:47 -0800 |
commit | 60549300dfd8961cf28abf80a7c31ac309f3ebfe (patch) | |
tree | a95933a947f8b306728634862be804bd54667ec3 /src | |
parent | a8c68e7796d4c1d420639b4563a70aee8c7e6f85 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_upgrade/test.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh index 051acd295b7..0a4047ed7cb 100644 --- a/src/bin/pg_upgrade/test.sh +++ b/src/bin/pg_upgrade/test.sh @@ -182,17 +182,17 @@ createdb "$dbname3" || createdb_status=$? if "$MAKE" -C "$oldsrc" installcheck; then 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 fix_sql="" case $oldpgversion in 804??) - fix_sql="DROP FUNCTION public.myfunc(integer); DROP FUNCTION public.oldstyle_length(integer, text);" - ;; - *) - fix_sql="DROP FUNCTION public.oldstyle_length(integer, text);" + fix_sql="DROP FUNCTION public.myfunc(integer);" ;; 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=$? fi |