Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> Re: knowing internal representation, I think this is required anyway;
> else the optimization would only work on a very limited numer of
> situations.
The point of my remark is that pushing this knowledge out to a function
is helpful only if you can put that function somehow at arm's length
from the main body of the optimizer. Otherwise structuring it like that
is useless obscurantism.
regards, tom lane