aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/typecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r--src/backend/commands/typecmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index d0d87a1184a..33b64fd2793 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -3503,7 +3503,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid,
* Domains don't allow variables (this is probably dead code now that
* add_missing_from is history, but let's be sure).
*/
- if (list_length(pstate->p_rtable) != 0 ||
+ if (pstate->p_rtable != NIL ||
contain_var_clause(expr))
ereport(ERROR,
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),