mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Advance transaction timestamp for intra-procedure transactions.
Per discussion, this behavior seems less astonishing than not doing so. Peter Eisentraut and Tom Lane Discussion: https://postgr.es/m/20180920234040.GC29981@momjian.us
This commit is contained in:
@ -423,6 +423,19 @@ AtEOSubXact_SPI(bool isCommit, SubTransactionId mySubid)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Are we executing inside a procedure (that is, a nonatomic SPI context)?
|
||||
*/
|
||||
bool
|
||||
SPI_inside_nonatomic_context(void)
|
||||
{
|
||||
if (_SPI_current == NULL)
|
||||
return false; /* not in any SPI context at all */
|
||||
if (_SPI_current->atomic)
|
||||
return false; /* it's atomic (ie function not procedure) */
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* Parse, plan, and execute a query string */
|
||||
int
|
||||
|
Reference in New Issue
Block a user