Skip to content

Commit a288d94

Browse files
committed
Remove redundant variable
Author: Amul Sul <sulamul@gmail.com> Reviewed-by: Jeevan Ladhe <jeevan.ladhe@enterprisedb.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/CAAJ_b94HaNcrPVREUuB9-qUn2uB+gfcoX3FG_Vx0S6aFse+yhw@mail.gmail.com
1 parent 4691163 commit a288d94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/parser/parse_utilcmd.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString)
176176
Oid namespaceid;
177177
Oid existing_relid;
178178
ParseCallbackState pcbstate;
179-
bool is_foreign_table = IsA(stmt, CreateForeignTableStmt);
180179

181180
/*
182181
* We must not scribble on the passed-in CreateStmt, so copy it. (This is
@@ -333,8 +332,11 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString)
333332

334333
/*
335334
* Postprocess check constraints.
335+
*
336+
* For regular tables all constraints can be marked valid immediately,
337+
* because the table is new therefore empty. Not so for foreign tables.
336338
*/
337-
transformCheckConstraints(&cxt, !is_foreign_table ? true : false);
339+
transformCheckConstraints(&cxt, !cxt.isforeign);
338340

339341
/*
340342
* Postprocess extended statistics.

0 commit comments

Comments
 (0)