PL/pgSQL nested CALL with transactions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject PL/pgSQL nested CALL with transactions
Date
Msg-id 4841b97f-be42-83e5-db27-d4baac40e38a@2ndquadrant.com
Whole thread Raw
Responses Re: PL/pgSQL nested CALL with transactions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
So far, a nested CALL or DO in PL/pgSQL would not establish a context
where transaction control statements were allowed.  This patch fixes
that by handling CALL and DO specially in PL/pgSQL, passing the
atomic/nonatomic execution context through and doing the required
management around transaction boundaries.

This requires a new flag in SPI to run SPI_execute* without snapshot
management.  This currently poked directly into the plan struct,
requiring access to spi_priv.h.  This could use some refinement ideas.

Other PLs are currently not supported, but they could be extended in the
future using the principles being worked out here.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Online enabling of checksums
Next
From: David Steele
Date:
Subject: PATCH: Unlogged tables re-initialization tests