PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
extension.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * extension.h
4  * Extension management commands (create/drop extension).
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/commands/extension.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef EXTENSION_H
15 #define EXTENSION_H
16 
17 #include "catalog/objectaddress.h"
18 #include "nodes/parsenodes.h"
19 
20 
21 /*
22  * creating_extension is only true while running a CREATE EXTENSION or ALTER
23  * EXTENSION UPDATE command. It instructs recordDependencyOnCurrentExtension()
24  * to register a dependency on the current pg_extension object for each SQL
25  * object created by an extension script. It also instructs performDeletion()
26  * to remove such dependencies without following them, so that extension
27  * scripts can drop member objects without having to explicitly dissociate
28  * them from the extension first.
29  */
32 
33 
35 
36 extern void RemoveExtensionById(Oid extId);
37 
38 extern ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner,
39  Oid schemaOid, bool relocatable, const char *extVersion,
40  Datum extConfig, Datum extCondition,
41  List *requiredExtensions);
42 
44 
46  ObjectAddress *objAddress);
47 
48 extern Oid get_extension_oid(const char *extname, bool missing_ok);
49 extern char *get_extension_name(Oid ext_oid);
50 
51 extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema,
52  Oid *oldschema);
53 
54 extern void AlterExtensionOwner_oid(Oid extensionOid, Oid newOwnerId);
55 
56 #endif /* EXTENSION_H */
unsigned int Oid
Definition: postgres_ext.h:31
#define PGDLLIMPORT
Definition: c.h:1052
void AlterExtensionOwner_oid(Oid extensionOid, Oid newOwnerId)
void RemoveExtensionById(Oid extId)
Definition: extension.c:1826
char * get_extension_name(Oid ext_oid)
Definition: extension.c:180
Oid CurrentExtensionObject
Definition: extension.c:68
ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt)
Definition: extension.c:2863
ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt)
Definition: extension.c:1621
uintptr_t Datum
Definition: postgres.h:372
ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner, Oid schemaOid, bool relocatable, const char *extVersion, Datum extConfig, Datum extCondition, List *requiredExtensions)
Definition: extension.c:1741
PGDLLIMPORT bool creating_extension
Definition: extension.c:67
ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *oldschema)
Definition: extension.c:2681
Definition: pg_list.h:45
ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt, ObjectAddress *objAddress)
Definition: extension.c:3171
Oid get_extension_oid(const char *extname, bool missing_ok)
Definition: extension.c:135