diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/executor/spi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index f8a9b529685..2beb6932ff5 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -2419,6 +2419,9 @@ _SPI_error_callback(void *arg) const char *query = (const char *) arg; int syntaxerrposition; + if (query == NULL) /* in case arg wasn't set yet */ + return; + /* * If there is a syntax error position, convert to internal syntax error; * otherwise treat the query as an item of context stack |