]> begriffs open source - ai-pg/blob - full-docs/man3/dblink_connect_u.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / dblink_connect_u.3
1 '\" t
2 .\"     Title: dblink_connect_u
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "DBLINK_CONNECT_U" "3" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 dblink_connect_u \- opens a persistent connection to a remote database, insecurely
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 dblink_connect_u(text connstr) returns text
36 dblink_connect_u(text connname, text connstr) returns text
37 .fi
38 .SH "DESCRIPTION"
39 .PP
40 \fBdblink_connect_u()\fR
41 is identical to
42 \fBdblink_connect()\fR, except that it will allow non\-superusers to connect using any authentication method\&.
43 .PP
44 If the remote server selects an authentication method that does not involve a password, then impersonation and subsequent escalation of privileges can occur, because the session will appear to have originated from the user as which the local
45 PostgreSQL
46 server runs\&. Also, even if the remote server does demand a password, it is possible for the password to be supplied from the server environment, such as a
47 ~/\&.pgpass
48 file belonging to the server\*(Aqs user\&. This opens not only a risk of impersonation, but the possibility of exposing a password to an untrustworthy remote server\&. Therefore,
49 \fBdblink_connect_u()\fR
50 is initially installed with all privileges revoked from
51 PUBLIC, making it un\-callable except by superusers\&. In some situations it may be appropriate to grant
52 EXECUTE
53 permission for
54 \fBdblink_connect_u()\fR
55 to specific users who are considered trustworthy, but this should be done with care\&. It is also recommended that any
56 ~/\&.pgpass
57 file belonging to the server\*(Aqs user
58 \fInot\fR
59 contain any records specifying a wildcard host name\&.
60 .PP
61 For further details see
62 \fBdblink_connect()\fR\&.