Hi,
Attached is a patch for being able to do $SUBJECT without a CTE. The
reasons this is better than a CTE version are:
1) It's not obvious why a CTE version works but a plain one doesn't
2) This one has less overhead (I measured a ~12% improvement on a
not-too-unreasonable test case)
With regard to RULEs, similar restrictions apply as the ones on
data-modifying statements in WITH.
I can't add this to November's commit fest, but I'm posting this anyway
in case someone is thinking about implementing this feature.
.m