Skip to content

Commit 2392136

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 5253906 commit 2392136

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

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

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