aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2015-04-25 21:10:45 -0400
committerBruce Momjian <bruce@momjian.us>2015-04-25 21:10:48 -0400
commit764ce22af30df3d62524d41815c41b4d696f3c10 (patch)
tree7fc4b29284fb768382fd7fb26b81579a0609ab20 /src/backend/parser/parse_utilcmd.c
parentee8d392765f29b1b8adb52f75008e301823f094b (diff)
downloadpostgresql-764ce22af30df3d62524d41815c41b4d696f3c10.tar.gz
postgresql-764ce22af30df3d62524d41815c41b4d696f3c10.zip
Revert: Honor OID status of CREATE LIKE'd tables
Reverts d992f8a8961c09ec219373ffe2b5e6473febd065 Report by Tom Lane
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r--src/backend/parser/parse_utilcmd.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index f66af41b1a3..1fc8c2cbe1e 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -56,7 +56,6 @@
#include "rewrite/rewriteManip.h"
#include "utils/acl.h"
#include "utils/builtins.h"
-#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
@@ -223,7 +222,7 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString)
cxt.blist = NIL;
cxt.alist = NIL;
cxt.pkey = NULL;
- cxt.hasoids = default_with_oids;
+ cxt.hasoids = interpretOidsOption(stmt->options, true);
Assert(!stmt->ofTypename || !stmt->inhRelations); /* grammar enforces */
@@ -282,17 +281,6 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString)
* Output results.
*/
stmt->tableElts = cxt.columns;
- /*
- * Add WITH/WITHOUT OIDS, if necessary. A literal statement-specified
- * WITH/WITHOUT OIDS will still take precedence because the first
- * matching "oids" in "options" is used.
- */
- if (cxt.hasoids && !interpretOidsOption(stmt->options, true))
- stmt->options = lappend(stmt->options, makeDefElem("oids",
- (Node *)makeInteger(TRUE)));
- else if (!cxt.hasoids && interpretOidsOption(stmt->options, true))
- stmt->options = lappend(stmt->options, makeDefElem("oids",
- (Node *)makeInteger(FALSE)));
stmt->constraints = cxt.ckconstraints;
result = lappend(cxt.blist, stmt);
@@ -861,8 +849,6 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
}
}
- cxt->hasoids = relation->rd_rel->relhasoids;
-
/*
* Copy CHECK constraints if requested, being careful to adjust attribute
* numbers so they match the child.