Avoid compiler warning in non-assert builds.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: bda97e47afaeaab6236f37993ce45bb369add3e5
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-07-22T14:32:52Z
Releases: 17.0
Avoid compiler warning in non-assert builds.

After 3c90dcd03, try_partitionwise_join's child_joinrelids
variable is read only in an Assert, provoking a compiler
warning in non-assert builds.  Rearrange code to avoid the
warning and eliminate unnecessary work in the non-assert case.

Per CI testing (via Jeff Davis and Bharath Rupireddy)

Discussion: https://postgr.es/m/ef0de9713e605451f1b60b30648c5ee900b2394c.camel@j-davis.com

Files

PathChange+/−
src/backend/optimizer/path/joinrels.c modified +8 −7

Discussion

Cited messages not in the archive: ef0de9713e605451f1b60b30648c5ee900b2394c.camel@j-davis.com