Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c9f9e8

Browse files
committed
Don't allow foreign tables with OIDs.
The syntax doesn't let you specify "WITH OIDS" for foreign tables, but itwas still possible with default_with_oids=true. But the rest of the system,including pg_dump, isn't prepared to handle foreign tables with OIDsproperly.Backpatch down to 9.1, where foreign tables were introduced. It's possiblethat there are databases out there that already have foreign tables withOIDs. There isn't much we can do about that, but at least we can preventthem from being created in the future.Patch by Etsuro Fujita, reviewed by Hadi Moshayedi.
1 parent07353de commit1c9f9e8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,10 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId)
550550
*/
551551
descriptor=BuildDescForRelation(schema);
552552

553-
localHasOids=interpretOidsOption(stmt->options);
553+
if (relkind==RELKIND_FOREIGN_TABLE)
554+
localHasOids= false;
555+
else
556+
localHasOids=interpretOidsOption(stmt->options);
554557
descriptor->tdhasoid= (localHasOids||parentOidCount>0);
555558

556559
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp