sophie yang <yangsophie(at)yahoo(dot)com> writes:
> rewriter, optimizer and executor. I am wondering at
> which step, PostgreSQL performs algebraic rewriting?
What do you consider "algebraic rewriting"? The optimizer does a pass of
constant-subexpression simplification, and also some boolean-expression
normalization, but I'm not sure if that's what you're looking for.
regards, tom lane