Re: 回复: are the 2 if-statements in join_is_legal() removable? - Mailing list pgsql-general

From Tom Lane
Subject Re: 回复: are the 2 if-statements in join_is_legal() removable?
Date
Msg-id 893833.1746977499@sss.pgh.pa.us
Whole thread Raw
In response to are the 2 if-statements in join_is_legal() removable?  (g l <orangegrove@live.com>)
List pgsql-general
g l <orangegrove@live.com> writes:
> Then I run the core regression tests with "make installcheck-parallel
> " for v18beta1 as the document dictates. When the regression test is done, only the last 2 log entries are found in
logfile,the first 2 entries are not printed at all. I run core regression also with v14.15 and v17.2, the results are
thesame. What test suite do I need to run to cover the first 2 branches, or could you please show me a example query
thatcan cover them? Thank you very much. 

The coverage.postgresql.org results are, I believe, for check-world
not just the core tests.  You might try contrib/postgres_fdw first,
as that tends to be the non-core test with the most planner coverage.

In any case, the fact that a few of these lines are not reached by
test cases doesn't constitute a bug, and it most certainly doesn't
mean it'd be safe to remove them.  Most of the logic in join_is_legal
comes in symmetrical pairs of cases for the two possible orderings
of the two input relations.  It's just coincidental which of a pair
of cases will be exercised by a given phrasing of a SQL query.
So I don't feel that we're particularly short on coverage here:
one or the other code path is fully exercised in each case,
according to the coverage.postgresql.org results.

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgresql 18beta1 and SPI changes
Next
From: Paul Foerster
Date:
Subject: Re: Updating to PostgreSQL 17.5