summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlvaro Herrera2021-05-06 21:28:36 +0000
committerAlvaro Herrera2021-05-06 21:28:36 +0000
commita288d94c91e345ebeb10ac30f247270c8c8e380a (patch)
tree02295829c424a004643e43981ed9389fe7c5c2ae /src
parent469116389e18dbf6be0bd555bc2055a26be91a48 (diff)
Remove redundant variable
Author: Amul Sul <[email protected]> Reviewed-by: Jeevan Ladhe <[email protected]> Reviewed-by: Bharath Rupireddy <[email protected]> Reviewed-by: Justin Pryzby <[email protected]> Discussion: https://postgr.es/m/CAAJ_b94HaNcrPVREUuB9-qUn2uB+gfcoX3FG_Vx0S6aFse+yhw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/parse_utilcmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 9dd30370dae..6fae9a96872 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -176,7 +176,6 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString)
Oid namespaceid;
Oid existing_relid;
ParseCallbackState pcbstate;
- bool is_foreign_table = IsA(stmt, CreateForeignTableStmt);
/*
* We must not scribble on the passed-in CreateStmt, so copy it. (This is
@@ -333,8 +332,11 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString)
/*
* Postprocess check constraints.
+ *
+ * For regular tables all constraints can be marked valid immediately,
+ * because the table is new therefore empty. Not so for foreign tables.
*/
- transformCheckConstraints(&cxt, !is_foreign_table ? true : false);
+ transformCheckConstraints(&cxt, !cxt.isforeign);
/*
* Postprocess extended statistics.