diff options
Diffstat (limited to 'src/backend/executor')
-rw-r--r-- | src/backend/executor/spi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 7ccabdb44b2..38de18006de 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -2226,8 +2226,12 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI, pg_strtouint64(completionTag + 7, NULL, 10); else { - /* Must be an IF NOT EXISTS that did nothing */ - Assert(ctastmt->if_not_exists); + /* + * Must be an IF NOT EXISTS that did nothing, or a + * CREATE ... WITH NO DATA. + */ + Assert(ctastmt->if_not_exists || + ctastmt->into->skipData); _SPI_current->processed = 0; } |