summaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-01-01 23:48:11 -0500
committerRobert Haas <rhaas@postgresql.org>2011-01-01 23:48:11 -0500
commit0d692a0dc9f0e532c67c577187fe5d7d323cb95b (patch)
tree5177be3794b8ffa768a3cd852221425bd2a74347 /src/backend/nodes/outfuncs.c
parent6600d5e91c754789002ed794c18cb856c190f58f (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 'src/backend/nodes/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 88256636662..c85fc2d9d48 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -1857,6 +1857,17 @@ _outCreateStmt(StringInfo str, CreateStmt *node)
}
static void
+_outCreateForeignTableStmt(StringInfo str, CreateForeignTableStmt *node)
+{
+ WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT");
+
+ _outCreateStmt(str, (CreateStmt *) &node->base);
+
+ WRITE_STRING_FIELD(servername);
+ WRITE_NODE_FIELD(options);
+}
+
+static void
_outIndexStmt(StringInfo str, IndexStmt *node)
{
WRITE_NODE_TYPE("INDEXSTMT");
@@ -2881,6 +2892,9 @@ _outNode(StringInfo str, void *obj)
case T_CreateStmt:
_outCreateStmt(str, obj);
break;
+ case T_CreateForeignTableStmt:
+ _outCreateForeignTableStmt(str, obj);
+ break;
case T_IndexStmt:
_outIndexStmt(str, obj);
break;