]> begriffs open source - ai-pg/blob - full-docs/man7/DROP_USER_MAPPING.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / DROP_USER_MAPPING.7
1 '\" t
2 .\"     Title: DROP USER MAPPING
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 "DROP USER MAPPING" "7" "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 DROP_USER_MAPPING \- remove a user mapping for a foreign server
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 DROP USER MAPPING [ IF EXISTS ] FOR { \fIuser_name\fR | USER | CURRENT_ROLE | CURRENT_USER | PUBLIC } SERVER \fIserver_name\fR
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBDROP USER MAPPING\fR
40 removes an existing user mapping from foreign server\&.
41 .PP
42 The owner of a foreign server can drop user mappings for that server for any user\&. Also, a user can drop a user mapping for their own user name if
43 USAGE
44 privilege on the server has been granted to the user\&.
45 .SH "PARAMETERS"
46 .PP
47 IF EXISTS
48 .RS 4
49 Do not throw an error if the user mapping does not exist\&. A notice is issued in this case\&.
50 .RE
51 .PP
52 \fIuser_name\fR
53 .RS 4
54 User name of the mapping\&.
55 CURRENT_ROLE,
56 CURRENT_USER, and
57 USER
58 match the name of the current user\&.
59 PUBLIC
60 is used to match all present and future user names in the system\&.
61 .RE
62 .PP
63 \fIserver_name\fR
64 .RS 4
65 Server name of the user mapping\&.
66 .RE
67 .SH "EXAMPLES"
68 .PP
69 Drop a user mapping
70 bob, server
71 foo
72 if it exists:
73 .sp
74 .if n \{\
75 .RS 4
76 .\}
77 .nf
78 DROP USER MAPPING IF EXISTS FOR bob SERVER foo;
79 .fi
80 .if n \{\
81 .RE
82 .\}
83 .SH "COMPATIBILITY"
84 .PP
85 \fBDROP USER MAPPING\fR
86 conforms to ISO/IEC 9075\-9 (SQL/MED)\&. The
87 IF EXISTS
88 clause is a
89 PostgreSQL
90 extension\&.
91 .SH "SEE ALSO"
92 CREATE USER MAPPING (\fBCREATE_USER_MAPPING\fR(7)), ALTER USER MAPPING (\fBALTER_USER_MAPPING\fR(7))