mirror of https://github.com/citusdata/citus.git
Check whether the function call is in transaction block
parent
5c74514600
commit
8901936e9a
|
@ -1169,6 +1169,12 @@ GetAggregateDDLCommand(const RegProcedure funcOid, bool useCreateOrReplace)
|
||||||
static void
|
static void
|
||||||
EnsureSequentialModeForFunctionDDL(void)
|
EnsureSequentialModeForFunctionDDL(void)
|
||||||
{
|
{
|
||||||
|
if (!IsTransactionBlock())
|
||||||
|
{
|
||||||
|
/* we do not need to switch to sequential mode if we are not in a transaction */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ParallelQueryExecutedInTransaction())
|
if (ParallelQueryExecutedInTransaction())
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errmsg("cannot create function because there was a "
|
ereport(ERROR, (errmsg("cannot create function because there was a "
|
||||||
|
|
Loading…
Reference in New Issue