On 09.07.23 03:21, Paul A Jungwirth wrote:
>> It seems to me that many of the test cases added in indexing.sql are
>> redundant with create_table.sql/alter_table.sql (or vice versa). Is
>> there a reason for this?
>
> Yes, there is some overlap. I think that's just because there was
> overlap before, and I didn't want to delete the old tests completely.
> But since indexing.sql has a fuller list of tests and is a superset of
> the others, this new patch removes the redundant tests from
> {create,alter}_table.sql.
This looks better.
> Btw speaking of tests, I want to make sure this new feature will still
> work when you're using btree_gist and and `EXCLUDE WITH (myint =,
> mytsrange &&)` (and not just `(myint4range =, mytsrange &&)`). Some of
> my early attempts writing this patch worked w/o btree_gist but not w/
> (or vice versa). But as far as I know there's no way to test that in
> regress. I wound up writing a private shell script that just does
> this:
> Is there some place in the repo to include a test like that? It seems
> a little funny to put it in the btree_gist suite, but maybe that's the
> right answer.
I'm not sure what value we would get from testing this with btree_gist,
but if we wanted to do that, then adding a new test file to the
btree_gist sql/ directory would seem reasonable to me.
(I would make the test a little bit bigger than you had shown, like
insert a few values.)
If you want to do that, please send another patch. Otherwise, I'm ok to
commit this one.