pgsql: Fix use-after-free bug with event triggers and ALTER TABLE.

2020-10-27 Thread Tom Lane
Fix use-after-free bug with event triggers and ALTER TABLE. EventTriggerAlterTableEnd neglected to make sure that it built its output list in the right context. In simple cases this was masked because the function is called in PortalContext which will be sufficiently long-lived anyway; but that d

pgsql: Fix use-after-free bug with event triggers and ALTER TABLE.

2020-10-27 Thread Tom Lane
Fix use-after-free bug with event triggers and ALTER TABLE. EventTriggerAlterTableEnd neglected to make sure that it built its output list in the right context. In simple cases this was masked because the function is called in PortalContext which will be sufficiently long-lived anyway; but that d

pgsql: Fix use-after-free bug with event triggers and ALTER TABLE.

2020-10-27 Thread Tom Lane
Fix use-after-free bug with event triggers and ALTER TABLE. EventTriggerAlterTableEnd neglected to make sure that it built its output list in the right context. In simple cases this was masked because the function is called in PortalContext which will be sufficiently long-lived anyway; but that d

pgsql: Fix use-after-free bug with event triggers and ALTER TABLE.

2020-10-27 Thread Tom Lane
Fix use-after-free bug with event triggers and ALTER TABLE. EventTriggerAlterTableEnd neglected to make sure that it built its output list in the right context. In simple cases this was masked because the function is called in PortalContext which will be sufficiently long-lived anyway; but that d

pgsql: Fix use-after-free bug with event triggers and ALTER TABLE.

2020-10-27 Thread Tom Lane
Fix use-after-free bug with event triggers and ALTER TABLE. EventTriggerAlterTableEnd neglected to make sure that it built its output list in the right context. In simple cases this was masked because the function is called in PortalContext which will be sufficiently long-lived anyway; but that d