• Alvaro Herrera's avatar
    Transform ALTER TABLE/SET TYPE/USING expr during parse analysis · 9550e834
    Alvaro Herrera authored
    This lets later stages have access to the transformed expression; in
    particular it allows DDL-deparsing code during event triggers to pass
    the transformed expression to ruleutils.c, so that the complete command
    can be deparsed.
    
    This shuffles the timing of the transform calls a bit: previously,
    nothing was transformed during parse analysis, and only the
    RELKIND_RELATION case was being handled during execution.  After this
    patch, all expressions are transformed during parse analysis (including
    those for relkinds other than RELATION), and the error for other
    relation kinds is thrown only during execution.  So we do more work than
    before to reject some bogus cases.  That seems acceptable.
    9550e834
tablecmds.c 355 KB