Thread: pgsql-server/src/pl/plpgsql/src pl_comp.c plpg ...

pgsql-server/src/pl/plpgsql/src pl_comp.c plpg ...

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql-server
Changes by:    tgl@svr1.postgresql.org    03/08/18 16:16:02

Modified files:
    src/pl/plpgsql/src: pl_comp.c plpgsql.h

Log message:
    When compiling a plpgsql trigger function, include the OID of the table
    the trigger is attached to in the hashkey.  This ensures that we will
    create separate compiled trees for each table the trigger is used with,
    avoiding possible datatype-mismatch problems if the tables have different
    rowtypes.  This is essentially the same bug recently identified in plpython
    --- though plpgsql doesn't seem as prone to crash when the rowtype changes
    underneath it.  But failing robustly is no substitute for just working.