diff --git a/src/test/regress/bin/normalize.sed b/src/test/regress/bin/normalize.sed index eb9dbab23..1ec8fd923 100644 --- a/src/test/regress/bin/normalize.sed +++ b/src/test/regress/bin/normalize.sed @@ -395,3 +395,14 @@ s/\/is still referenced from table/g s/^[[:space:]]*ERROR:[[:space:]]+subscription "[^"]+" could not connect to the publisher:[[:space:]]*/ERROR: could not connect to the publisher: /I # PG18: drop verbose 'connection to server … failed:' preamble s/^[[:space:]]*ERROR:[[:space:]]+could not connect to the publisher:[[:space:]]*connection to server .* failed:[[:space:]]*/ERROR: could not connect to the publisher: /I + +# PG18: replace named window refs like "OVER w1" with neutral "OVER (?)" +# this rule can be removed when PG18 is the minimum supported version +# only on Sort Key / Group Key / Output lines +# Sort Key +/^[[:space:]]*Sort Key:/ s/(OVER[[:space:]]+)w[0-9]+/\1(?)/g +# Group Key +/^[[:space:]]*Group Key:/ s/(OVER[[:space:]]+)w[0-9]+/\1(?)/g +# Output +/^[[:space:]]*Output:/ s/(OVER[[:space:]]+)w[0-9]+/\1(?)/g +# end PG18 window ref normalization diff --git a/src/test/regress/expected/multi_test_helpers.out b/src/test/regress/expected/multi_test_helpers.out index 00c4a61d7..4a24b5ed9 100644 --- a/src/test/regress/expected/multi_test_helpers.out +++ b/src/test/regress/expected/multi_test_helpers.out @@ -736,6 +736,9 @@ begin IF ln ~ '^[[:space:]]*Index[[:space:]]+Searches:[[:space:]]*[0-9]+[[:space:]]*$' THEN CONTINUE; END IF; + IF ln ~ '^[[:space:]]*Window:[[:space:]].*$' THEN -- e.g., "Window: w1 AS (...)" + CONTINUE; + END IF; -- Replace any numeric word with just 'N' ln := regexp_replace(ln, '-?\m\d+\M', 'N', 'g'); diff --git a/src/test/regress/sql/multi_test_helpers.sql b/src/test/regress/sql/multi_test_helpers.sql index e605e7e90..39cc49ec0 100644 --- a/src/test/regress/sql/multi_test_helpers.sql +++ b/src/test/regress/sql/multi_test_helpers.sql @@ -767,6 +767,9 @@ begin IF ln ~ '^[[:space:]]*Index[[:space:]]+Searches:[[:space:]]*[0-9]+[[:space:]]*$' THEN CONTINUE; END IF; + IF ln ~ '^[[:space:]]*Window:[[:space:]].*$' THEN -- e.g., "Window: w1 AS (...)" + CONTINUE; + END IF; -- Replace any numeric word with just 'N' ln := regexp_replace(ln, '-?\m\d+\M', 'N', 'g');