3 -- Adjust this setting to control where the objects get created.
4 SET search_path
= public;
6 -- dblink_connect now restricts non-superusers to password
7 -- authenticated connections
8 CREATE OR REPLACE FUNCTION dblink_connect (text)
10 AS 'MODULE_PATHNAME','dblink_connect'
13 CREATE OR REPLACE FUNCTION dblink_connect (text, text)
15 AS 'MODULE_PATHNAME','dblink_connect'
18 -- dblink_connect_u allows non-superusers to use
19 -- non-password authenticated connections, but initially
20 -- privileges are revoked from public
21 CREATE OR REPLACE FUNCTION dblink_connect_u (text)
23 AS 'MODULE_PATHNAME','dblink_connect'
24 LANGUAGE C
STRICT SECURITY DEFINER;
26 CREATE OR REPLACE FUNCTION dblink_connect_u (text, text)
28 AS 'MODULE_PATHNAME','dblink_connect'
29 LANGUAGE C
STRICT SECURITY DEFINER;
31 REVOKE ALL ON FUNCTION dblink_connect_u (text) FROM public;
32 REVOKE ALL ON FUNCTION dblink_connect_u (text, text) FROM public;
34 CREATE OR REPLACE FUNCTION dblink_disconnect ()
36 AS 'MODULE_PATHNAME','dblink_disconnect'
39 CREATE OR REPLACE FUNCTION dblink_disconnect (text)
41 AS 'MODULE_PATHNAME','dblink_disconnect'
44 CREATE OR REPLACE FUNCTION dblink_open (text, text)
46 AS 'MODULE_PATHNAME','dblink_open'
49 CREATE OR REPLACE FUNCTION dblink_open (text, text, boolean)
51 AS 'MODULE_PATHNAME','dblink_open'
54 CREATE OR REPLACE FUNCTION dblink_open (text, text, text)
56 AS 'MODULE_PATHNAME','dblink_open'
59 CREATE OR REPLACE FUNCTION dblink_open (text, text, text, boolean)
61 AS 'MODULE_PATHNAME','dblink_open'
64 CREATE OR REPLACE FUNCTION dblink_fetch (text, int)
66 AS 'MODULE_PATHNAME','dblink_fetch'
69 CREATE OR REPLACE FUNCTION dblink_fetch (text, int, boolean)
71 AS 'MODULE_PATHNAME','dblink_fetch'
74 CREATE OR REPLACE FUNCTION dblink_fetch (text, text, int)
76 AS 'MODULE_PATHNAME','dblink_fetch'
79 CREATE OR REPLACE FUNCTION dblink_fetch (text, text, int, boolean)
81 AS 'MODULE_PATHNAME','dblink_fetch'
84 CREATE OR REPLACE FUNCTION dblink_close (text)
86 AS 'MODULE_PATHNAME','dblink_close'
89 CREATE OR REPLACE FUNCTION dblink_close (text, boolean)
91 AS 'MODULE_PATHNAME','dblink_close'
94 CREATE OR REPLACE FUNCTION dblink_close (text, text)
96 AS 'MODULE_PATHNAME','dblink_close'
99 CREATE OR REPLACE FUNCTION dblink_close (text, text, boolean)
101 AS 'MODULE_PATHNAME','dblink_close'
104 CREATE OR REPLACE FUNCTION dblink (text, text)
106 AS 'MODULE_PATHNAME','dblink_record'
109 CREATE OR REPLACE FUNCTION dblink (text, text, boolean)
111 AS 'MODULE_PATHNAME','dblink_record'
114 CREATE OR REPLACE FUNCTION dblink (text)
116 AS 'MODULE_PATHNAME','dblink_record'
119 CREATE OR REPLACE FUNCTION dblink (text, boolean)
121 AS 'MODULE_PATHNAME','dblink_record'
124 CREATE OR REPLACE FUNCTION dblink_exec (text, text)
126 AS 'MODULE_PATHNAME','dblink_exec'
129 CREATE OR REPLACE FUNCTION dblink_exec (text, text, boolean)
131 AS 'MODULE_PATHNAME','dblink_exec'
134 CREATE OR REPLACE FUNCTION dblink_exec (text)
136 AS 'MODULE_PATHNAME','dblink_exec'
139 CREATE OR REPLACE FUNCTION dblink_exec (text,boolean)
141 AS 'MODULE_PATHNAME','dblink_exec'
144 CREATE TYPE dblink_pkey_results
AS (position int, colname
text);
146 CREATE OR REPLACE FUNCTION dblink_get_pkey (text)
147 RETURNS setof dblink_pkey_results
148 AS 'MODULE_PATHNAME','dblink_get_pkey'
151 CREATE OR REPLACE FUNCTION dblink_build_sql_insert (text, int2vector
, int, _text
, _text
)
153 AS 'MODULE_PATHNAME','dblink_build_sql_insert'
156 CREATE OR REPLACE FUNCTION dblink_build_sql_delete (text, int2vector
, int, _text
)
158 AS 'MODULE_PATHNAME','dblink_build_sql_delete'
161 CREATE OR REPLACE FUNCTION dblink_build_sql_update (text, int2vector
, int, _text
, _text
)
163 AS 'MODULE_PATHNAME','dblink_build_sql_update'
166 CREATE OR REPLACE FUNCTION dblink_current_query ()
168 AS 'SELECT pg_catalog.current_query()'
171 CREATE OR REPLACE FUNCTION dblink_send_query(text, text)
173 AS 'MODULE_PATHNAME', 'dblink_send_query'
176 CREATE OR REPLACE FUNCTION dblink_is_busy(text)
178 AS 'MODULE_PATHNAME', 'dblink_is_busy'
181 CREATE OR REPLACE FUNCTION dblink_get_result(text)
183 AS 'MODULE_PATHNAME', 'dblink_get_result'
186 CREATE OR REPLACE FUNCTION dblink_get_result(text, bool
)
188 AS 'MODULE_PATHNAME', 'dblink_get_result'
191 CREATE OR REPLACE FUNCTION dblink_get_connections()
193 AS 'MODULE_PATHNAME', 'dblink_get_connections'
196 CREATE OR REPLACE FUNCTION dblink_cancel_query(text)
198 AS 'MODULE_PATHNAME', 'dblink_cancel_query'
201 CREATE OR REPLACE FUNCTION dblink_error_message(text)
203 AS 'MODULE_PATHNAME', 'dblink_error_message'