Thread: pgsql/src/backend optimizer/prep/preptlist.c r ...

pgsql/src/backend optimizer/prep/preptlist.c r ...

From
tgl@postgresql.org (Tom Lane)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql
Changes by:    tgl@postgresql.org    02/04/05 00:47:06

Modified files:
    src/backend/optimizer/prep: preptlist.c
    src/backend/rewrite: rewriteHandler.c

Log message:
    Undo not-so-hot decision to postpone insertion of default values into
    INSERT statements to the planner.  Taking it out of the parser was right
    (so that defaults don't get into stored rules), but it has to happen
    before rewrite rule expansion, else references to NEW.field behave
    incorrectly.  Accordingly, add a step to the rewriter to insert defaults
    just before rewrite-rule expansion.