Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8f337e8

Browse files
committed
Please apply attached patch to contrib/dblink. It adds named persistent
connections to dblink.Shridhar Daithanka
1 parent92798de commit8f337e8

File tree

10 files changed

+855
-614
lines changed

10 files changed

+855
-614
lines changed

‎contrib/dblink/README.dblink

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
* Functions returning results from a remote database
55
*
66
* Joe Conway <mail@joeconway.com>
7+
* And contributors:
8+
* Darko Prenosil <Darko.Prenosil@finteh.hr>
9+
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
710
*
8-
* Copyright (c) 2001, 2002 by PostgreSQL Global Development Group
11+
* Copyright (c) 2001, 2002, 2003 by PostgreSQL Global Development Group
912
* ALL RIGHTS RESERVED;
1013
*
1114
* Permission to use, copy, modify, and distribute this software and its
@@ -27,14 +30,16 @@
2730
*
2831
*/
2932

30-
Version 0.5 (25 August, 2002):
31-
Major overhaul to work with new backend "table function" capability. Removed
32-
dblink_strtok() and dblink_replace() functions because they are now
33-
available as backend functions (split() and replace() respectively).
34-
Tested under Linux (Red Hat 7.3) and PostgreSQL 7.3devel. This version
35-
is no longer backwards portable to PostgreSQL 7.2.
33+
Version 0.6 (14 June, 2003):
34+
Completely removed previously deprecated functions. Added ability
35+
to create "named" persistent connections in addition to the single global
36+
"unnamed" persistent connection.
37+
Tested under Linux (Red Hat 9) and PostgreSQL 7.4devel.
3638

3739
Release Notes:
40+
Version 0.6
41+
- functions deprecated in 0.5 have been removed
42+
- added ability to create "named" persistent connections
3843
Version 0.5
3944
- dblink now supports use directly as a table function; this is the new
4045
preferred usage going forward
@@ -87,35 +92,51 @@ Installation:
8792
connection
8893
------------
8994
dblink_connect(text) RETURNS text
90-
- opens a connection that will persist for duration of current
95+
- opens an unnamed connection that will persist for duration of
96+
current backend or until it is disconnected
97+
dblink_connect(text,text) RETURNS text
98+
- opens a named connection that will persist for duration of current
9199
backend or until it is disconnected
92100
dblink_disconnect() RETURNS text
93-
- disconnects a persistent connection
101+
- disconnects the unnamed persistent connection
102+
dblink_disconnect(text) RETURNS text
103+
- disconnects a named persistent connection
94104

95105
cursor
96106
------------
97107
dblink_open(text,text) RETURNS text
98-
- opens a cursor using connection already opened with dblink_connect()
99-
that will persist for duration of current backend or until it is
100-
closed
108+
- opens a cursor using unnamed connection already opened with
109+
dblink_connect() that will persist for duration of current backend
110+
or until it is closed
111+
dblink_open(text,text,text) RETURNS text
112+
- opens a cursor using a named connection already opened with
113+
dblink_connect() that will persist for duration of current backend
114+
or until it is closed
101115
dblink_fetch(text, int) RETURNS setof record
102-
- fetches data from an already opened cursor
116+
- fetches data from an already opened cursor on the unnamed connection
117+
dblink_fetch(text, text, int) RETURNS setof record
118+
- fetches data from an already opened cursor on a named connection
103119
dblink_close(text) RETURNS text
104-
- closes a cursor
120+
- closes a cursor on the unnamed connection
121+
dblink_close(text,text) RETURNS text
122+
- closes a cursor on a named connection
105123

106124
query
107125
------------
108126
dblink(text,text) RETURNS setof record
109-
- returns a set of results from remote SELECT query
110-
(Note: comment out in dblink.sql to use deprecated version)
127+
- returns a set of results from remote SELECT query; the first argument
128+
is either a connection string, or the name of an already opened
129+
persistant connection
111130
dblink(text) RETURNS setof record
112-
- returns a set of results from remote SELECT query, usingconnection
113-
already opened with dblink_connect()
131+
- returns a set of results from remote SELECT query, usingthe unnamed
132+
connectionalready opened with dblink_connect()
114133

115134
execute
116135
------------
117136
dblink_exec(text, text) RETURNS text
118-
- executes an INSERT/UPDATE/DELETE query remotely
137+
- executes an INSERT/UPDATE/DELETE query remotely; the first argument
138+
is either a connection string, or the name of an already opened
139+
persistant connection
119140
dblink_exec(text) RETURNS text
120141
- executes an INSERT/UPDATE/DELETE query remotely, using connection
121142
already opened with dblink_connect()
@@ -136,19 +157,6 @@ Installation:
136157
- builds an update statement using a local tuple, replacing the
137158
selection key field values with alternate supplied values
138159

139-
Not installed by default
140-
deprecated
141-
------------
142-
dblink(text,text) RETURNS setof int
143-
- *DEPRECATED* returns a resource id for results from remote query
144-
(Note: must uncomment in dblink.sql to use)
145-
dblink_tok(int,int) RETURNS text
146-
- *DEPRECATED* extracts and returns individual field results; used
147-
only in conjunction with the *DEPRECATED* form of dblink
148-
(Note: must uncomment in dblink.sql to use)
149-
dblink_last_oid(int) RETURNS oid
150-
- *DEPRECATED* returns the last inserted oid
151-
152160
Documentation:
153161

154162
Note: Parameters representing relation names must include double

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp