Fix indentation in twophase.c
[pgsql.git] / src / include / commands / extension.h
blob74ae39139585aa9dbb6a4ffc868f9bbd5f5fb643
1 /*-------------------------------------------------------------------------
3 * extension.h
4 * Extension management commands (create/drop extension).
7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/commands/extension.h
12 *-------------------------------------------------------------------------
14 #ifndef EXTENSION_H
15 #define EXTENSION_H
17 #include "catalog/objectaddress.h"
18 #include "parser/parse_node.h"
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.
30 extern PGDLLIMPORT bool creating_extension;
31 extern PGDLLIMPORT Oid CurrentExtensionObject;
34 extern ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt);
36 extern void RemoveExtensionById(Oid extId);
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);
43 extern ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt);
45 extern ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt,
46 ObjectAddress *objAddr);
48 extern Oid get_extension_oid(const char *extname, bool missing_ok);
49 extern char *get_extension_name(Oid ext_oid);
50 extern Oid get_extension_schema(Oid ext_oid);
51 extern bool extension_file_exists(const char *extensionName);
53 extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema,
54 Oid *oldschema);
56 #endif /* EXTENSION_H */