diff --git a/nix/tests/expected/index_advisor.out b/nix/tests/expected/index_advisor.out new file mode 100644 index 000000000..5a269ba54 --- /dev/null +++ b/nix/tests/expected/index_advisor.out @@ -0,0 +1,16 @@ +create schema v; +create table v.book( + id int primary key, + title text not null +); +select + index_statements, errors +from + index_advisor('select id from v.book where title = $1'); + index_statements | errors +------------------------------------------------+-------- + {"CREATE INDEX ON v.book USING btree (title)"} | {} +(1 row) + +drop schema v cascade; +NOTICE: drop cascades to table v.book diff --git a/nix/tests/sql/index_advisor.sql b/nix/tests/sql/index_advisor.sql new file mode 100644 index 000000000..3911d6eb5 --- /dev/null +++ b/nix/tests/sql/index_advisor.sql @@ -0,0 +1,13 @@ +create schema v; + +create table v.book( + id int primary key, + title text not null +); + +select + index_statements, errors +from + index_advisor('select id from v.book where title = $1'); + +drop schema v cascade;