(2014/04/04 13:35), Etsuro Fujita wrote: > If I understand correctly, foreign tables cannot have an OID column, but > the following code in DefineRelation() assumes that foreign tables *can* > have that coulum:
On second thought I noticed that that makes CREATE FOREIGN TABLE include an OID column in newly-created foreign tables wrongly, when the default_with_oids parameter is set to on. Please find attached a patch. Thanks, Best regards, Etsuro Fujita
*** a/src/backend/commands/tablecmds.c --- b/src/backend/commands/tablecmds.c *************** *** 565,572 **** DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId) descriptor = BuildDescForRelation(schema); localHasOids = interpretOidsOption(stmt->options, ! (relkind == RELKIND_RELATION || ! relkind == RELKIND_FOREIGN_TABLE)); descriptor->tdhasoid = (localHasOids || parentOidCount > 0); /* --- 565,571 ---- descriptor = BuildDescForRelation(schema); localHasOids = interpretOidsOption(stmt->options, ! relkind == RELKIND_RELATION); descriptor->tdhasoid = (localHasOids || parentOidCount > 0); /*
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers