PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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-2025, 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
18#include "parser/parse_node.h"
19
20/* GUC */
22
23/*
24 * creating_extension is only true while running a CREATE EXTENSION or ALTER
25 * EXTENSION UPDATE command. It instructs recordDependencyOnCurrentExtension()
26 * to register a dependency on the current pg_extension object for each SQL
27 * object created by an extension script. It also instructs performDeletion()
28 * to remove such dependencies without following them, so that extension
29 * scripts can drop member objects without having to explicitly dissociate
30 * them from the extension first.
31 */
34
35
37
38extern void RemoveExtensionById(Oid extId);
39
40extern ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner,
41 Oid schemaOid, bool relocatable, const char *extVersion,
42 Datum extConfig, Datum extCondition,
43 List *requiredExtensions);
44
46
48 ObjectAddress *objAddr);
49
50extern Oid get_extension_oid(const char *extname, bool missing_ok);
51extern char *get_extension_name(Oid ext_oid);
52extern Oid get_extension_schema(Oid ext_oid);
53extern bool extension_file_exists(const char *extensionName);
54
55extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema,
56 Oid *oldschema);
57
58#endif /* EXTENSION_H */
#define PGDLLIMPORT
Definition: c.h:1291
Oid get_extension_schema(Oid ext_oid)
Definition: extension.c:208
ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner, Oid schemaOid, bool relocatable, const char *extVersion, Datum extConfig, Datum extCondition, List *requiredExtensions)
Definition: extension.c:2063
ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt)
Definition: extension.c:1965
PGDLLIMPORT Oid CurrentExtensionObject
Definition: extension.c:78
ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *oldschema)
Definition: extension.c:3040
PGDLLIMPORT bool creating_extension
Definition: extension.c:77
PGDLLIMPORT char * Extension_control_path
Definition: extension.c:74
ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt)
Definition: extension.c:3255
ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt, ObjectAddress *objAddr)
Definition: extension.c:3560
Oid get_extension_oid(const char *extname, bool missing_ok)
Definition: extension.c:164
char * get_extension_name(Oid ext_oid)
Definition: extension.c:186
void RemoveExtensionById(Oid extId)
Definition: extension.c:2151
bool extension_file_exists(const char *extensionName)
Definition: extension.c:2469
#define stmt
Definition: indent_codes.h:59
uintptr_t Datum
Definition: postgres.h:69
unsigned int Oid
Definition: postgres_ext.h:30
Definition: pg_list.h:54