1CREATE USER MAPPING(7)  PostgreSQL 9.2.24 Documentation CREATE USER MAPPING(7)
2
3
4

NAME

6       CREATE_USER_MAPPING - define a new mapping of a user to a foreign
7       server
8

SYNOPSIS

10       CREATE USER MAPPING FOR { user_name | USER | CURRENT_USER | PUBLIC }
11           SERVER server_name
12           [ OPTIONS ( option 'value' [ , ... ] ) ]
13

DESCRIPTION

15       CREATE USER MAPPING defines a mapping of a user to a foreign server. A
16       user mapping typically encapsulates connection information that a
17       foreign-data wrapper uses together with the information encapsulated by
18       a foreign server to access an external data resource.
19
20       The owner of a foreign server can create user mappings for that server
21       for any user. Also, a user can create a user mapping for his own user
22       name if USAGE privilege on the server has been granted to the user.
23

PARAMETERS

25       user_name
26           The name of an existing user that is mapped to foreign server.
27           CURRENT_USER and USER match the name of the current user. When
28           PUBLIC is specified, a so-called public mapping is created that is
29           used when no user-specific mapping is applicable.
30
31       server_name
32           The name of an existing server for which the user mapping is to be
33           created.
34
35       OPTIONS ( option 'value' [, ... ] )
36           This clause specifies the options of the user mapping. The options
37           typically define the actual user name and password of the mapping.
38           Option names must be unique. The allowed option names and values
39           are specific to the server's foreign-data wrapper.
40

EXAMPLES

42       Create a user mapping for user bob, server foo:
43
44           CREATE USER MAPPING FOR bob SERVER foo OPTIONS (user 'bob', password 'secret');
45

COMPATIBILITY

47       CREATE USER MAPPING conforms to ISO/IEC 9075-9 (SQL/MED).
48

SEE ALSO

50       ALTER USER MAPPING (ALTER_USER_MAPPING(7)), DROP USER MAPPING
51       (DROP_USER_MAPPING(7)), CREATE FOREIGN DATA WRAPPER
52       (CREATE_FOREIGN_DATA_WRAPPER(7)), CREATE SERVER (CREATE_SERVER(7))
53
54
55
56PostgreSQL 9.2.24                 2017-11-06            CREATE USER MAPPING(7)
Impressum