summaryrefslogtreecommitdiffstats
path: root/yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/extension.h
diff options
context:
space:
mode:
authorvvvv <[email protected]>2024-11-07 12:29:36 +0300
committervvvv <[email protected]>2024-11-07 13:49:47 +0300
commitd4c258e9431675bab6745c8638df6e3dfd4dca6b (patch)
treeb5efcfa11351152a4c872fccaea35749141c0b11 /yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/extension.h
parent13a4f274caef5cfdaf0263b24e4d6bdd5521472b (diff)
Moved other yql/essentials libs YQL-19206
init commit_hash:7d4c435602078407bbf20dd3c32f9c90d2bbcbc0
Diffstat (limited to 'yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/extension.h')
-rw-r--r--yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/extension.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/extension.h b/yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/extension.h
new file mode 100644
index 00000000000..22e50e282bd
--- /dev/null
+++ b/yql/essentials/parser/pg_wrapper/postgresql/src/include/commands/extension.h
@@ -0,0 +1,56 @@
+/*-------------------------------------------------------------------------
+ *
+ * extension.h
+ * Extension management commands (create/drop extension).
+ *
+ *
+ * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/commands/extension.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef EXTENSION_H
+#define EXTENSION_H
+
+#include "catalog/objectaddress.h"
+#include "parser/parse_node.h"
+
+
+/*
+ * creating_extension is only true while running a CREATE EXTENSION or ALTER
+ * EXTENSION UPDATE command. It instructs recordDependencyOnCurrentExtension()
+ * to register a dependency on the current pg_extension object for each SQL
+ * object created by an extension script. It also instructs performDeletion()
+ * to remove such dependencies without following them, so that extension
+ * scripts can drop member objects without having to explicitly dissociate
+ * them from the extension first.
+ */
+extern __thread PGDLLIMPORT bool creating_extension;
+extern __thread PGDLLIMPORT Oid CurrentExtensionObject;
+
+
+extern ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt);
+
+extern void RemoveExtensionById(Oid extId);
+
+extern ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner,
+ Oid schemaOid, bool relocatable, const char *extVersion,
+ Datum extConfig, Datum extCondition,
+ List *requiredExtensions);
+
+extern ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt);
+
+extern ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt,
+ ObjectAddress *objAddr);
+
+extern Oid get_extension_oid(const char *extname, bool missing_ok);
+extern char *get_extension_name(Oid ext_oid);
+extern Oid get_extension_schema(Oid ext_oid);
+extern bool extension_file_exists(const char *extensionName);
+
+extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema,
+ Oid *oldschema);
+
+#endif /* EXTENSION_H */