```
It throws an error.
After some investigation, I found that:
1. in the function `transformRuleStmt`, it creates a new ParseState `sub_pstate` to transform
actions. And in this `sub_pstate`, it is initially contains two rangetblentry, "old" and "new".
2. in the function `transformSelectStmt`, it will invoke `transformLockingClause` to handle `for update`. And it loops all the entries in rtables.
I think for a CreateRuleStmt, its command part if is a select-for-update statement, the for-update clause should skip the two "new", "old" RangeTblEntry.
How to fix this:
1. forbid the syntax: rule's command cannot be a select-for-update
2. skip new and old: I have a patch to show this idea, please see the attachment.
Any thoughts? Thanks!