mirror of https://github.com/citusdata/citus.git
Example process utility
parent
6254f30305
commit
637c334865
|
@ -40,6 +40,7 @@
|
||||||
#include "catalog/dependency.h"
|
#include "catalog/dependency.h"
|
||||||
#include "commands/dbcommands.h"
|
#include "commands/dbcommands.h"
|
||||||
#include "commands/defrem.h"
|
#include "commands/defrem.h"
|
||||||
|
#include "commands/extension.h"
|
||||||
#include "commands/tablecmds.h"
|
#include "commands/tablecmds.h"
|
||||||
#include "distributed/adaptive_executor.h"
|
#include "distributed/adaptive_executor.h"
|
||||||
#include "distributed/colocation_utils.h"
|
#include "distributed/colocation_utils.h"
|
||||||
|
@ -193,6 +194,21 @@ multi_ProcessUtility(PlannedStmt *pstmt,
|
||||||
ErrorIfUnstableCreateOrAlterExtensionStmt(parsetree);
|
ErrorIfUnstableCreateOrAlterExtensionStmt(parsetree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsA(parsetree, CreateExtensionStmt))
|
||||||
|
{
|
||||||
|
CreateExtensionStmt *createExtensionStmt = castNode(CreateExtensionStmt, parsetree);
|
||||||
|
if (strcmp(createExtensionStmt->extname, "citus") == 0)
|
||||||
|
{
|
||||||
|
CreateExtensionStmt *createCitusStmt = makeNode(CreateExtensionStmt);
|
||||||
|
createCitusStmt->extname = "foo";
|
||||||
|
createCitusStmt->if_not_exists = true;
|
||||||
|
createCitusStmt->options = NIL;
|
||||||
|
|
||||||
|
CreateExtension(NULL, createCitusStmt);
|
||||||
|
CommandCounterIncrement();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!CitusHasBeenLoaded())
|
if (!CitusHasBeenLoaded())
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue