Re: Planner : anti-join on left joins - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Planner : anti-join on left joins
Date
Msg-id 4094987.1767290791@sss.pgh.pa.us
Whole thread Raw
In response to Re: Planner : anti-join on left joins  (Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com>)
List pgsql-hackers
Nicolas Adenis-Lamarre <nicolas.adenis.lamarre@gmail.com> writes:
> i added locally some regressions tests for such detection, but i needed to
> add cols to tenk1 cause tenk1 has no "not null" columns nor primary keys.
> i'm too new to tell if that's the correct way to do.

It is absolutely not.  In general, modifying the properties of any
of the commonly-used objects made by test_setup.sql is a bad idea.
There's too much risk of side-effects on other tests.  Even if they
don't show visible output changes, the code might now be following
some other code path and thus not testing what was intended.  This
seems particularly risky for changes in constraints, which might
change planner decisions.

If you need a table that's not like any existing test table, make a
new one.  But in this case it seems like there are probably existing
tests that cover behavior adjacent to what you want to test.  Maybe
you can re-use some of their tables and not have to expend test cycles
on building a whole new table.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Include extension path on pg_available_extensions
Next
From: Kirill Reshke
Date:
Subject: Re: REASSIGN OWNED BY alters objects in other database.