1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
12
TITLE="PostgreSQL 9.1beta1 Documentation"
13
HREF="index.html"><LINK
15
TITLE="Data Definition"
19
HREF="ddl-partitioning.html"><LINK
21
TITLE="Other Database Objects"
22
HREF="ddl-others.html"><LINK
25
HREF="stylesheet.css"><META
26
HTTP-EQUIV="Content-Type"
27
CONTENT="text/html; charset=ISO-8859-1"><META
29
CONTENT="2011-04-27T21:20:33"></HEAD
35
SUMMARY="Header navigation table"
47
>PostgreSQL 9.1beta1 Documentation</A
57
HREF="ddl-partitioning.html"
66
TITLE="Data Definition"
74
>Chapter 5. Data Definition</TD
80
TITLE="Data Definition"
89
TITLE="Other Database Objects"
90
HREF="ddl-others.html"
104
NAME="DDL-FOREIGN-DATA"
105
>5.10. Foreign Data</A
111
> implements portions of the SQL/MED
112
specification, allowing you to access data that resides outside
113
PostgreSQL using regular SQL queries. Such data is referred to as
117
>. (Note that this usage is not to be confused
118
with foreign keys, which are a type of constraint within the database.)
121
> Foreign data is accessed with help from a
124
>foreign data wrapper</I
125
>. A foreign data wrapper is a
126
library that can communicate with an external data source, hiding the
127
details of connecting to the data source and fetching data from it. There
128
are several foreign data wrappers available, which can for example read
129
plain data files residing on the server, or connect to another PostgreSQL
130
instance. If none of the existing foreign data wrappers suit your needs,
131
you can write your own; see <A
132
HREF="fdwhandler.html"
137
> To access foreign data, you need to create a <I
141
object, which defines how to connect to a particular external data source,
142
according to the set of options used by a particular foreign data
143
wrapper. Then you need to create one or more <I
147
>, which define the structure of the remote data. A
148
foreign table can be used in queries just like a normal table, but a
149
foreign table has no storage in the PostgreSQL server. Whenever it is
150
used, PostgreSQL asks the foreign data wrapper to fetch the data from the
154
> Currently, foreign tables are read-only. This limitation may be fixed
163
SUMMARY="Footer navigation table"
174
HREF="ddl-partitioning.html"
192
HREF="ddl-others.html"
216
>Other Database Objects</TD
b'\\ No newline at end of file'