Skip to content

Commit 7e81a18

Browse files
committed
Fix parallel-safety markings for contrib/dblink.
As shown by buildfarm reports, dblink_build_sql_insert and dblink_build_sql_update are *not* parallel safe, because they may attempt to access temporary tables of the local session. Although dblink_build_sql_delete doesn't actually touch the contents of the referenced table, it seems consistent and prudent to mark it PARALLEL RESTRICTED too.
1 parent 915b703 commit 7e81a18

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

contrib/dblink/dblink--1.1--1.2.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ ALTER FUNCTION dblink_exec(text, text, boolean) PARALLEL RESTRICTED;
3030
ALTER FUNCTION dblink_exec(text) PARALLEL RESTRICTED;
3131
ALTER FUNCTION dblink_exec(text, boolean) PARALLEL RESTRICTED;
3232
ALTER FUNCTION dblink_get_pkey(text) PARALLEL RESTRICTED;
33-
ALTER FUNCTION dblink_build_sql_insert(text, int2vector, int, _text, _text) PARALLEL SAFE;
34-
ALTER FUNCTION dblink_build_sql_delete(text, int2vector, int, _text) PARALLEL SAFE;
35-
ALTER FUNCTION dblink_build_sql_update(text, int2vector, int, _text, _text) PARALLEL SAFE;
33+
ALTER FUNCTION dblink_build_sql_insert(text, int2vector, int, _text, _text) PARALLEL RESTRICTED;
34+
ALTER FUNCTION dblink_build_sql_delete(text, int2vector, int, _text) PARALLEL RESTRICTED;
35+
ALTER FUNCTION dblink_build_sql_update(text, int2vector, int, _text, _text) PARALLEL RESTRICTED;
3636
ALTER FUNCTION dblink_current_query() PARALLEL RESTRICTED;
3737
ALTER FUNCTION dblink_send_query(text, text) PARALLEL RESTRICTED;
3838
ALTER FUNCTION dblink_is_busy(text) PARALLEL RESTRICTED;

contrib/dblink/dblink--1.2.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,17 @@ LANGUAGE C STRICT PARALLEL RESTRICTED;
151151
CREATE FUNCTION dblink_build_sql_insert (text, int2vector, int, _text, _text)
152152
RETURNS text
153153
AS 'MODULE_PATHNAME','dblink_build_sql_insert'
154-
LANGUAGE C STRICT PARALLEL SAFE;
154+
LANGUAGE C STRICT PARALLEL RESTRICTED;
155155

156156
CREATE FUNCTION dblink_build_sql_delete (text, int2vector, int, _text)
157157
RETURNS text
158158
AS 'MODULE_PATHNAME','dblink_build_sql_delete'
159-
LANGUAGE C STRICT PARALLEL SAFE;
159+
LANGUAGE C STRICT PARALLEL RESTRICTED;
160160

161161
CREATE FUNCTION dblink_build_sql_update (text, int2vector, int, _text, _text)
162162
RETURNS text
163163
AS 'MODULE_PATHNAME','dblink_build_sql_update'
164-
LANGUAGE C STRICT PARALLEL SAFE;
164+
LANGUAGE C STRICT PARALLEL RESTRICTED;
165165

166166
CREATE FUNCTION dblink_current_query ()
167167
RETURNS text

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy