diff options
Diffstat (limited to 'src/backend/commands/publicationcmds.c')
| -rw-r--r-- | src/backend/commands/publicationcmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 89a005540f..8b574b86c4 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -848,12 +848,12 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt) &schemaidlist); /* FOR ALL TABLES IN SCHEMA requires superuser */ - if (list_length(schemaidlist) > 0 && !superuser()) + if (schemaidlist != NIL && !superuser()) ereport(ERROR, errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("must be superuser to create FOR ALL TABLES IN SCHEMA publication")); - if (list_length(relations) > 0) + if (relations != NIL) { List *rels; @@ -871,7 +871,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt) CloseTableList(rels); } - if (list_length(schemaidlist) > 0) + if (schemaidlist != NIL) { /* * Schema lock is held until the publication is created to prevent |
