Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9405b16f
Commit
9405b16f
authored
Jun 18, 2009
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more documentation and cross-links on using dblink with SQL/MED.
parent
12bc87e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
11 deletions
+40
-11
doc/src/sgml/dblink.sgml
doc/src/sgml/dblink.sgml
+6
-4
doc/src/sgml/ref/create_foreign_data_wrapper.sgml
doc/src/sgml/ref/create_foreign_data_wrapper.sgml
+4
-2
doc/src/sgml/ref/create_server.sgml
doc/src/sgml/ref/create_server.sgml
+22
-1
doc/src/sgml/ref/create_user_mapping.sgml
doc/src/sgml/ref/create_user_mapping.sgml
+8
-4
No files found.
doc/src/sgml/dblink.sgml
View file @
9405b16f
<!-- $PostgreSQL: pgsql/doc/src/sgml/dblink.sgml,v 1.
7 2009/06/06 21:27:56 jo
e Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/dblink.sgml,v 1.
8 2009/06/18 14:34:36 peter
e Exp $ -->
<sect1 id="dblink">
<sect1 id="dblink">
<title>dblink</title>
<title>dblink</title>
...
@@ -45,8 +45,10 @@
...
@@ -45,8 +45,10 @@
<para>
<para>
The connection string may also be the name of an existing foreign
The connection string may also be the name of an existing foreign
server that utilizes the postgresql_fdw foreign data wrapper library.
server. It is recommended to use
See the example below, as well as the following:
the <function>postgresql_fdw_validator</function> when defining
the corresponding foreign-data wrapper. See the example below, as
well as the following:
<simplelist type="inline">
<simplelist type="inline">
<member><xref linkend="sql-createforeigndatawrapper" endterm="sql-createforeigndatawrapper-title"></member>
<member><xref linkend="sql-createforeigndatawrapper" endterm="sql-createforeigndatawrapper-title"></member>
<member><xref linkend="sql-createserver" endterm="sql-createserver-title"></member>
<member><xref linkend="sql-createserver" endterm="sql-createserver-title"></member>
...
@@ -134,7 +136,7 @@
...
@@ -134,7 +136,7 @@
-- DETAIL: Non-superuser cannot connect if the server does not request a password.
-- DETAIL: Non-superuser cannot connect if the server does not request a password.
-- HINT: Target server's authentication method must be changed.
-- HINT: Target server's authentication method must be changed.
CREATE USER dblink_regression_test WITH PASSWORD 'secret';
CREATE USER dblink_regression_test WITH PASSWORD 'secret';
CREATE FOREIGN DATA WRAPPER postgresql;
CREATE FOREIGN DATA WRAPPER postgresql
VALIDATOR postgresql_fdw_validator
;
CREATE SERVER fdtest FOREIGN DATA WRAPPER postgresql OPTIONS (hostaddr '127.0.0.1', dbname 'contrib_regression');
CREATE SERVER fdtest FOREIGN DATA WRAPPER postgresql OPTIONS (hostaddr '127.0.0.1', dbname 'contrib_regression');
CREATE USER MAPPING FOR dblink_regression_test SERVER fdtest OPTIONS (user 'dblink_regression_test', password 'secret');
CREATE USER MAPPING FOR dblink_regression_test SERVER fdtest OPTIONS (user 'dblink_regression_test', password 'secret');
...
...
doc/src/sgml/ref/create_foreign_data_wrapper.sgml
View file @
9405b16f
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_foreign_data_wrapper.sgml,v 1.
3 2009/02/27 07:20:00
petere Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_foreign_data_wrapper.sgml,v 1.
4 2009/06/18 14:34:36
petere Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -103,7 +103,9 @@ CREATE FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable>
...
@@ -103,7 +103,9 @@ CREATE FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable>
rudimentary. The purpose of foreign-data wrappers, foreign
rudimentary. The purpose of foreign-data wrappers, foreign
servers, and user mappings is to store this information in a
servers, and user mappings is to store this information in a
standard way so that it can be queried by interested applications.
standard way so that it can be queried by interested applications.
The functionality to actually query external data does not exist
One such application is <application>dblink</application>;
see <xref linkend="dblink">. The functionality to actually query
external data through a foreign-data wrapper library does not exist
yet.
yet.
</para>
</para>
...
...
doc/src/sgml/ref/create_server.sgml
View file @
9405b16f
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_server.sgml,v 1.
3 2009/02/27 07:20:00
petere Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_server.sgml,v 1.
4 2009/06/18 14:34:36
petere Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -34,6 +34,13 @@ CREATE SERVER <replaceable class="parameter">servername</replaceable> [ TYPE 'se
...
@@ -34,6 +34,13 @@ CREATE SERVER <replaceable class="parameter">servername</replaceable> [ TYPE 'se
user who defines the server becomes its owner.
user who defines the server becomes its owner.
</para>
</para>
<para>
A foreign server typically encapsulates connection information that
a foreign-data wrapper uses to access an external data resource.
Additional user-specific connection information may be specified by
means of user mappings.
</para>
<para>
<para>
The server name must be unique within the database.
The server name must be unique within the database.
</para>
</para>
...
@@ -98,6 +105,20 @@ CREATE SERVER <replaceable class="parameter">servername</replaceable> [ TYPE 'se
...
@@ -98,6 +105,20 @@ CREATE SERVER <replaceable class="parameter">servername</replaceable> [ TYPE 'se
</variablelist>
</variablelist>
</refsect1>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
When using the <application>dblink</application> module
(see <xref linkend="dblink">), the foreign server name can be used
as an argument of the <xref linkend="contrib-dblink-connect">
function to indicate the connection parameters. See also there for
more examples. It is necessary to have
the <literal>USAGE</literal> privilege on the foreign server to be
able to use it in this way.
</para>
</refsect1>
<refsect1>
<refsect1>
<title>Examples</title>
<title>Examples</title>
...
...
doc/src/sgml/ref/create_user_mapping.sgml
View file @
9405b16f
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_user_mapping.sgml,v 1.
4 2009/02/27 07:20:00
petere Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_user_mapping.sgml,v 1.
5 2009/06/18 14:34:36
petere Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -31,7 +31,10 @@ CREATE USER MAPPING FOR { <replaceable class="parameter">username</replaceable>
...
@@ -31,7 +31,10 @@ CREATE USER MAPPING FOR { <replaceable class="parameter">username</replaceable>
<para>
<para>
<command>CREATE USER MAPPING</command> defines a mapping of a user
<command>CREATE USER MAPPING</command> defines a mapping of a user
to a foreign server.
to a foreign server. A user mapping typically encapsulates
connection information that a foreign-data wrapper uses together
with the information encapsulated be a foreign server to access an
external data resource.
</para>
</para>
<para>
<para>
...
@@ -52,8 +55,9 @@ CREATE USER MAPPING FOR { <replaceable class="parameter">username</replaceable>
...
@@ -52,8 +55,9 @@ CREATE USER MAPPING FOR { <replaceable class="parameter">username</replaceable>
<para>
<para>
The name of an existing user that is mapped to foreign server.
The name of an existing user that is mapped to foreign server.
<literal>CURRENT_USER</> and <literal>USER</> match the name of
<literal>CURRENT_USER</> and <literal>USER</> match the name of
the current user. <literal>PUBLIC</> is used to match all
the current user. When <literal>PUBLIC</> is specified, a
present and future user names in the system.
so-called public mapping is created that is used when no
user-specific mapping is applicable.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment