Skip to content

Commit 52202bb

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 107a2d4 commit 52202bb

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
@@ -167,17 +167,17 @@ createdb "regression$dbname3" || createdb_status=$?
167167
if "$MAKE" -C "$oldsrc" installcheck-parallel; then
168168
oldpgversion=`psql -X -A -t -d regression -c "SHOW server_version_num"`
169169

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy