diff --git a/expected/hypo_include.out b/expected/hypo_include.out index 3febb3a..fff33b4 100644 --- a/expected/hypo_include.out +++ b/expected/hypo_include.out @@ -10,10 +10,11 @@ SELECT hypopg_reset(); VACUUM ANALYZE hypo; -- Should not use hypothetical index -- Create normal index -SELECT hypopg_create_index('CREATE INDEX ON hypo (id)'); - hypopg_create_index ------------------------------- - (13719,<13719>btree_hypo_id) +SELECT COUNT(*) AS NB +FROM hypopg_create_index('CREATE INDEX ON hypo (id)'); + nb +---- + 1 (1 row) -- Should use hypothetical index using a regular Index Scan @@ -32,10 +33,11 @@ SELECT hypopg_reset(); (1 row) -- Create INCLUDE index -SELECT hypopg_create_index('CREATE INDEX ON hypo (id) INCLUDE (val)'); - hypopg_create_index ----------------------------------- - (13719,<13719>btree_hypo_id_val) +SELECT COUNT(*) AS NB +FROM hypopg_create_index('CREATE INDEX ON hypo (id) INCLUDE (val)'); + nb +---- + 1 (1 row) -- Should use hypothetical index using an Index Only Scan diff --git a/test/sql/hypo_include.sql b/test/sql/hypo_include.sql index 9c944b5..4ee483b 100644 --- a/test/sql/hypo_include.sql +++ b/test/sql/hypo_include.sql @@ -9,7 +9,8 @@ VACUUM ANALYZE hypo; -- Should not use hypothetical index -- Create normal index -SELECT hypopg_create_index('CREATE INDEX ON hypo (id)'); +SELECT COUNT(*) AS NB +FROM hypopg_create_index('CREATE INDEX ON hypo (id)'); -- Should use hypothetical index using a regular Index Scan SELECT COUNT(*) FROM do_explain('SELECT val FROM hypo WHERE id = 1') e @@ -19,7 +20,8 @@ WHERE e ~ 'Index Scan.*<\d+>btree_hypo.*'; SELECT hypopg_reset(); -- Create INCLUDE index -SELECT hypopg_create_index('CREATE INDEX ON hypo (id) INCLUDE (val)'); +SELECT COUNT(*) AS NB +FROM hypopg_create_index('CREATE INDEX ON hypo (id) INCLUDE (val)'); -- Should use hypothetical index using an Index Only Scan SELECT COUNT(*) FROM do_explain('SELECT val FROM hypo WHERE id = 1') e