pgsql: Fix mishandling of after-trigger state when a SQL function - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix mishandling of after-trigger state when a SQL function
Date
Msg-id 20061012170228.D00119FB3C5@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix mishandling of after-trigger state when a SQL function returns multiple
rows --- if the surrounding query queued any trigger events between the rows,
the events would be fired at the wrong time, leading to bizarre behavior.
Per report from Merlin Moncure.

This is a simple patch that should solve the problem fully in the back
branches, but in HEAD we also need to consider the possibility of queries
with RETURNING clauses.  Will look into a fix for that separately.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/executor:
        functions.c (r1.98.2.1 -> r1.98.2.2)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/functions.c.diff?r1=1.98.2.1&r2=1.98.2.2)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Use Min() instead of min() in qsort, for consistency and to avoid
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix mishandling of after-trigger state when a SQL function