diff options
| author | Robert Haas <rhaas@postgresql.org> | 2011-01-01 23:48:11 -0500 |
|---|---|---|
| committer | Robert Haas <rhaas@postgresql.org> | 2011-01-01 23:48:11 -0500 |
| commit | 0d692a0dc9f0e532c67c577187fe5d7d323cb95b (patch) | |
| tree | 5177be3794b8ffa768a3cd852221425bd2a74347 /contrib | |
| parent | 6600d5e91c754789002ed794c18cb856c190f58f (diff) | |
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
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/pageinspect/rawpage.c | 5 | ||||
| -rw-r--r-- | contrib/pgstattuple/pgstattuple.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c index e4e933dfaf7..2607576c378 100644 --- a/contrib/pageinspect/rawpage.c +++ b/contrib/pageinspect/rawpage.c @@ -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 diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index 3a5d9c27b44..e5ddd870910 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -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; |
