~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/html/ddl-foreign-data.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
2
<HTML
 
3
><HEAD
 
4
><TITLE
 
5
>Foreign Data</TITLE
 
6
><META
 
7
NAME="GENERATOR"
 
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
 
9
REV="MADE"
 
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
 
11
REL="HOME"
 
12
TITLE="PostgreSQL 9.1beta1 Documentation"
 
13
HREF="index.html"><LINK
 
14
REL="UP"
 
15
TITLE="Data Definition"
 
16
HREF="ddl.html"><LINK
 
17
REL="PREVIOUS"
 
18
TITLE="Partitioning"
 
19
HREF="ddl-partitioning.html"><LINK
 
20
REL="NEXT"
 
21
TITLE="Other Database Objects"
 
22
HREF="ddl-others.html"><LINK
 
23
REL="STYLESHEET"
 
24
TYPE="text/css"
 
25
HREF="stylesheet.css"><META
 
26
HTTP-EQUIV="Content-Type"
 
27
CONTENT="text/html; charset=ISO-8859-1"><META
 
28
NAME="creation"
 
29
CONTENT="2011-04-27T21:20:33"></HEAD
 
30
><BODY
 
31
CLASS="SECT1"
 
32
><DIV
 
33
CLASS="NAVHEADER"
 
34
><TABLE
 
35
SUMMARY="Header navigation table"
 
36
WIDTH="100%"
 
37
BORDER="0"
 
38
CELLPADDING="0"
 
39
CELLSPACING="0"
 
40
><TR
 
41
><TH
 
42
COLSPAN="5"
 
43
ALIGN="center"
 
44
VALIGN="bottom"
 
45
><A
 
46
HREF="index.html"
 
47
>PostgreSQL 9.1beta1 Documentation</A
 
48
></TH
 
49
></TR
 
50
><TR
 
51
><TD
 
52
WIDTH="10%"
 
53
ALIGN="left"
 
54
VALIGN="top"
 
55
><A
 
56
TITLE="Partitioning"
 
57
HREF="ddl-partitioning.html"
 
58
ACCESSKEY="P"
 
59
>Prev</A
 
60
></TD
 
61
><TD
 
62
WIDTH="10%"
 
63
ALIGN="left"
 
64
VALIGN="top"
 
65
><A
 
66
TITLE="Data Definition"
 
67
HREF="ddl.html"
 
68
>Fast Backward</A
 
69
></TD
 
70
><TD
 
71
WIDTH="60%"
 
72
ALIGN="center"
 
73
VALIGN="bottom"
 
74
>Chapter 5. Data Definition</TD
 
75
><TD
 
76
WIDTH="10%"
 
77
ALIGN="right"
 
78
VALIGN="top"
 
79
><A
 
80
TITLE="Data Definition"
 
81
HREF="ddl.html"
 
82
>Fast Forward</A
 
83
></TD
 
84
><TD
 
85
WIDTH="10%"
 
86
ALIGN="right"
 
87
VALIGN="top"
 
88
><A
 
89
TITLE="Other Database Objects"
 
90
HREF="ddl-others.html"
 
91
ACCESSKEY="N"
 
92
>Next</A
 
93
></TD
 
94
></TR
 
95
></TABLE
 
96
><HR
 
97
ALIGN="LEFT"
 
98
WIDTH="100%"></DIV
 
99
><DIV
 
100
CLASS="SECT1"
 
101
><H1
 
102
CLASS="SECT1"
 
103
><A
 
104
NAME="DDL-FOREIGN-DATA"
 
105
>5.10. Foreign Data</A
 
106
></H1
 
107
><P
 
108
>    <SPAN
 
109
CLASS="PRODUCTNAME"
 
110
>PostgreSQL</SPAN
 
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
 
114
    <I
 
115
CLASS="FIRSTTERM"
 
116
>foreign data</I
 
117
>.  (Note that this usage is not to be confused
 
118
    with foreign keys, which are a type of constraint within the database.)
 
119
   </P
 
120
><P
 
121
>    Foreign data is accessed with help from a
 
122
    <I
 
123
CLASS="FIRSTTERM"
 
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"
 
133
>Chapter 50</A
 
134
>.
 
135
   </P
 
136
><P
 
137
>    To access foreign data, you need to create a <I
 
138
CLASS="FIRSTTERM"
 
139
>foreign server</I
 
140
>
 
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
 
144
CLASS="FIRSTTERM"
 
145
>foreign
 
146
    tables</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
 
151
    external source.
 
152
   </P
 
153
><P
 
154
>    Currently, foreign tables are read-only.  This limitation may be fixed
 
155
    in a future release.
 
156
   </P
 
157
></DIV
 
158
><DIV
 
159
CLASS="NAVFOOTER"
 
160
><HR
 
161
ALIGN="LEFT"
 
162
WIDTH="100%"><TABLE
 
163
SUMMARY="Footer navigation table"
 
164
WIDTH="100%"
 
165
BORDER="0"
 
166
CELLPADDING="0"
 
167
CELLSPACING="0"
 
168
><TR
 
169
><TD
 
170
WIDTH="33%"
 
171
ALIGN="left"
 
172
VALIGN="top"
 
173
><A
 
174
HREF="ddl-partitioning.html"
 
175
ACCESSKEY="P"
 
176
>Prev</A
 
177
></TD
 
178
><TD
 
179
WIDTH="34%"
 
180
ALIGN="center"
 
181
VALIGN="top"
 
182
><A
 
183
HREF="index.html"
 
184
ACCESSKEY="H"
 
185
>Home</A
 
186
></TD
 
187
><TD
 
188
WIDTH="33%"
 
189
ALIGN="right"
 
190
VALIGN="top"
 
191
><A
 
192
HREF="ddl-others.html"
 
193
ACCESSKEY="N"
 
194
>Next</A
 
195
></TD
 
196
></TR
 
197
><TR
 
198
><TD
 
199
WIDTH="33%"
 
200
ALIGN="left"
 
201
VALIGN="top"
 
202
>Partitioning</TD
 
203
><TD
 
204
WIDTH="34%"
 
205
ALIGN="center"
 
206
VALIGN="top"
 
207
><A
 
208
HREF="ddl.html"
 
209
ACCESSKEY="U"
 
210
>Up</A
 
211
></TD
 
212
><TD
 
213
WIDTH="33%"
 
214
ALIGN="right"
 
215
VALIGN="top"
 
216
>Other Database Objects</TD
 
217
></TR
 
218
></TABLE
 
219
></DIV
 
220
></BODY
 
221
></HTML
 
222
>
 
 
b'\\ No newline at end of file'