]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix incorrect logic in plan dependency recording
authorDavid Rowley <drowley@postgresql.org>
Wed, 13 Sep 2023 23:27:16 +0000 (11:27 +1200)
committerDavid Rowley <drowley@postgresql.org>
Wed, 13 Sep 2023 23:27:16 +0000 (11:27 +1200)
commit1a6900e58ae2c61b84b516901985e405b9d457b7
tree5ebeb32dbfbbc72f8187af55ed0f523bfb1d5931
parenta81e5516fa4bc53e332cb35eefe231147c0e1749
Fix incorrect logic in plan dependency recording

Both 50e17ad28 and 29f45e299 mistakenly tried to record a plan dependency
on a function but mistakenly inverted the OidIsValid test.  This meant
that we'd record a dependency only when the function's Oid was
InvalidOid.  Clearly this was meant to *not* record the dependency in
that case.

50e17ad28 made this mistake first, then in v15 29f45e299 copied the same
mistake.

Reported-by: Tom Lane
Backpatch-through: 14, where 50e17ad28 first made this mistake
Discussion: https://postgr.es/m/2277537.1694301772@sss.pgh.pa.us
src/backend/optimizer/plan/setrefs.c