diff options
| author | Peter Eisentraut | 2017-02-09 03:51:09 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2017-02-15 15:01:28 +0000 |
| commit | 6d16ecc646d21b39092970c591fd0f73b4cfc26b (patch) | |
| tree | 39a31e88e1e82ae5a76eddf446d2c128dbf2b80b /src/include | |
| parent | e403732ef66d368f0a9a154d8f756f5d28615b8a (diff) | |
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 699ce2f9ee3..3b2fcb82711 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 07a84361432..5afc3ebea04 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; /* ---------------------- |
