mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Add IF NOT EXISTS for CREATE SERVER and CREATE USER MAPPING
There is still some inconsistency with the error messages surrounding foreign servers. Some use the word "foreign" and some don't. My inclination is to remove all such uses of "foreign" on the basis that the CREATE/ALTER/DROP SERVER commands don't use the word. However, that is left for another day. In this patch I have kept to the existing usage in the affected commands, which omits "foreign". Anastasia Lubennikova, reviewed by Arthur Zakirov and Ashtosh Bapat. Discussion: http://postgr.es/m/7c2ab9b8-388a-1ce0-23a3-7acf2a0ed3c6@postgrespro.ru
This commit is contained in:
@@ -2154,6 +2154,7 @@ typedef struct CreateForeignServerStmt
|
||||
char *servertype; /* optional server type */
|
||||
char *version; /* optional server version */
|
||||
char *fdwname; /* FDW name */
|
||||
bool if_not_exists; /* just do nothing if it already exists? */
|
||||
List *options; /* generic options to server */
|
||||
} CreateForeignServerStmt;
|
||||
|
||||
@@ -2188,6 +2189,7 @@ typedef struct CreateUserMappingStmt
|
||||
NodeTag type;
|
||||
RoleSpec *user; /* user role */
|
||||
char *servername; /* server name */
|
||||
bool if_not_exists; /* just do nothing if it already exists? */
|
||||
List *options; /* generic options to server */
|
||||
} CreateUserMappingStmt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user