Skip to content

Commit

Permalink
Be more permissive in brin regression tests.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rjuju committed Jun 22, 2020
1 parent 205482a commit 48ed9e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion expected/hypo_brin.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/sql/hypo_brin.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 48ed9e4

Please sign in to comment.