From 48ed9e4f179d890f56d183bce76c81a0417403bf Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Mon, 22 Jun 2020 15:55:28 +0200 Subject: [PATCH] Be more permissive in brin regression tests. Upstream postgres will probably soon push some changes that will change the semantics of explain_get_index_name_hook_type. The returned index name will automatically be properly quoted if needed, while it was previously the extension's duty to take care of that, which hypopg failed to do. See discussion at https://postgr.es/m/flat/16502-57bd1c9f913ed1d1%40postgresql.org for more details. To avoid build failure when the change is committed, change brin regression test to match an hypothetical index name whether is quoted or not, similarly to how it's done in all other regression tests. --- expected/hypo_brin.out | 2 +- test/sql/hypo_brin.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/expected/hypo_brin.out b/expected/hypo_brin.out index a93465d..059b6f3 100644 --- a/expected/hypo_brin.out +++ b/expected/hypo_brin.out @@ -12,7 +12,7 @@ FROM public.hypopg_create_index('CREATE INDEX ON hypo_brin USING brin (id);'); -- Should use hypothetical index SET enable_seqscan = 0; SELECT COUNT(*) FROM do_explain('SELECT * FROM hypo_brin WHERE id = 1') e -WHERE e ~ 'Bitmap Index Scan on <\d+>brin_hypo_brin.*'; +WHERE e ~ 'Bitmap Index Scan.*<\d+>brin_hypo_brin.*'; count ------- 1 diff --git a/test/sql/hypo_brin.sql b/test/sql/hypo_brin.sql index 86d87fb..e5031bc 100644 --- a/test/sql/hypo_brin.sql +++ b/test/sql/hypo_brin.sql @@ -13,6 +13,6 @@ FROM public.hypopg_create_index('CREATE INDEX ON hypo_brin USING brin (id);'); -- Should use hypothetical index SET enable_seqscan = 0; SELECT COUNT(*) FROM do_explain('SELECT * FROM hypo_brin WHERE id = 1') e -WHERE e ~ 'Bitmap Index Scan on <\d+>brin_hypo_brin.*'; +WHERE e ~ 'Bitmap Index Scan.*<\d+>brin_hypo_brin.*'; DROP TABLE hypo_brin;