Martijn van Oosterhout <kleptog@svana.org> writes:
> randomAccess is set if EXEC_FLAG_BACKWARD is set, but does that
> guarentee it will never be tried?
If it were tried, that would be caller error. Think of it as an Assert ;-)
> src/backend/optimizer/plan/planner.c function inheritance_planner=20
> If the bulk of the loop is skipped for any reason, we segfault right
> after.
Another poor man's Assert.
> src/backend/utils/adt/selfuncs.c function like_selectivity
> Assume this function is never called with a zero length bytea
> constant. It just looks wierd to set patt to NULL only to Assert() it
> three lines down.
This may be a real bug --- I'm not sure how well the bytea-LIKE path has
been tested, and it looks odd to me too.
> src/backend/utils/adt/ruleutils.c function get_sublink_expr
> We assume sublink->subLinkType == ANY_SUBLINK implies
> sublink->testexpr != NULL.
Yeah, it does.
> src/backend/rewrite/rewriteHandler.c function AcquireRewriteLocks
> Assume ((Var*)var)->varno > 0
For a join alias, I don't see any problem there.
> src/backend/executor/execMain.c function ExecutePlan
> We assume an UPDATE statement always has a junkfilter.
Yup.
regards, tom lane