diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-02-08 22:51:09 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-02-15 10:01:28 -0500 |
commit | 6d16ecc646d21b39092970c591fd0f73b4cfc26b (patch) | |
tree | 39a31e88e1e82ae5a76eddf446d2c128dbf2b80b /src/include | |
parent | e403732ef66d368f0a9a154d8f756f5d28615b8a (diff) | |
download | postgresql-6d16ecc646d21b39092970c591fd0f73b4cfc26b.tar.gz |
Add CREATE COLLATION IF NOT EXISTS clause
The core of the functionality was already implemented when
pg_import_system_collations was added. This just exposes it as an
option in the SQL command.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/commands/collationcmds.h | 2 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/include/commands/collationcmds.h b/src/include/commands/collationcmds.h index 699ce2f9ee..3b2fcb8271 100644 --- a/src/include/commands/collationcmds.h +++ b/src/include/commands/collationcmds.h @@ -18,7 +18,7 @@ #include "catalog/objectaddress.h" #include "nodes/parsenodes.h" -extern ObjectAddress DefineCollation(ParseState *pstate, List *names, List *parameters); +extern ObjectAddress DefineCollation(ParseState *pstate, List *names, List *parameters, bool if_not_exists); extern void IsThereCollationInNamespace(const char *collname, Oid nspOid); #endif /* COLLATIONCMDS_H */ diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 07a8436143..5afc3ebea0 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -2380,6 +2380,7 @@ typedef struct DefineStmt List *defnames; /* qualified name (list of Value strings) */ List *args; /* a list of TypeName (if needed) */ List *definition; /* a list of DefElem */ + bool if_not_exists; /* just do nothing if it already exists? */ } DefineStmt; /* ---------------------- |