PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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-2026, 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
41 Oid schemaOid, bool relocatable, const char *extVersion,
44
46
49
50extern Oid get_extension_oid(const char *extname, bool missing_ok);
51extern char *get_extension_name(Oid ext_oid);
53extern bool extension_file_exists(const char *extensionName);
54
56
57extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema,
58 Oid *oldschema);
59
60#endif /* EXTENSION_H */
#define PGDLLIMPORT
Definition c.h:1334
Oid get_extension_schema(Oid ext_oid)
Definition extension.c:271
ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner, Oid schemaOid, bool relocatable, const char *extVersion, Datum extConfig, Datum extCondition, List *requiredExtensions)
Definition extension.c:2240
Oid get_function_sibling_type(Oid funcoid, const char *typname)
Definition extension.c:311
ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt)
Definition extension.c:2142
PGDLLIMPORT Oid CurrentExtensionObject
Definition extension.c:80
ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *oldschema)
Definition extension.c:3251
PGDLLIMPORT bool creating_extension
Definition extension.c:79
PGDLLIMPORT char * Extension_control_path
Definition extension.c:76
ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt)
Definition extension.c:3466
ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt, ObjectAddress *objAddr)
Definition extension.c:3771
Oid get_extension_oid(const char *extname, bool missing_ok)
Definition extension.c:227
char * get_extension_name(Oid ext_oid)
Definition extension.c:249
void RemoveExtensionById(Oid extId)
Definition extension.c:2328
bool extension_file_exists(const char *extensionName)
Definition extension.c:2680
#define stmt
NameData typname
Definition pg_type.h:41
uint64_t Datum
Definition postgres.h:70
unsigned int Oid
static int fb(int x)
Definition pg_list.h:54