mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Basic foreign table support.
Foreign tables are a core component of SQL/MED. This commit does not provide a working SQL/MED infrastructure, because foreign tables cannot yet be queried. Support for foreign table scans will need to be added in a future patch. However, this patch creates the necessary system catalog structure, syntax support, and support for ancillary operations such as COMMENT and SECURITY LABEL. Shigeru Hanada, heavily revised by Robert Haas
This commit is contained in:
@ -119,6 +119,11 @@ get_raw_page_internal(text *relname, ForkNumber forknum, BlockNumber blkno)
|
||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("cannot get raw page from composite type \"%s\"",
|
||||
RelationGetRelationName(rel))));
|
||||
if (rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("cannot get raw page from foreign table \"%s\"",
|
||||
RelationGetRelationName(rel))));
|
||||
|
||||
/*
|
||||
* Reject attempts to read non-local temporary relations; we would be
|
||||
|
@ -242,6 +242,9 @@ pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
|
||||
case RELKIND_COMPOSITE_TYPE:
|
||||
err = "composite type";
|
||||
break;
|
||||
case RELKIND_FOREIGN_TABLE:
|
||||
err = "foreign table";
|
||||
break;
|
||||
default:
|
||||
err = "unknown";
|
||||
break;
|
||||
|
Reference in New Issue
Block a user