Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 635140a

Browse files
committed
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.
1 parent 9ad2689 commit 635140a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/pg_upgrade/test.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,17 @@ createdb "regression$dbname3" || createdb_status=$?
168168
if "$MAKE" -C "$oldsrc" installcheck-parallel; then
169169
oldpgversion=`psql -X -A -t -d regression -c "SHOW server_version_num"`
170170

171-
# before dumping, get rid of objects not existing in later versions
171+
# before dumping, get rid of objects not feasible in later versions
172172
if [ "$newsrc" != "$oldsrc" ]; then
173173
fix_sql=""
174174
case $oldpgversion in
175175
804??)
176-
fix_sql="DROP FUNCTION public.myfunc(integer); DROP FUNCTION public.oldstyle_length(integer, text);"
177-
;;
178-
*)
179-
fix_sql="DROP FUNCTION public.oldstyle_length(integer, text);"
176+
fix_sql="DROP FUNCTION public.myfunc(integer);"
180177
;;
181178
esac
179+
fix_sql="$fix_sql
180+
DROP FUNCTION IF EXISTS
181+
public.oldstyle_length(integer, text); -- last in 9.6";
182182
psql -X -d regression -c "$fix_sql;" || psql_fix_sql_status=$?
183183
fi
184184

0 commit comments

Comments
 (0)