mirror of https://github.com/citusdata/citus.git
install citus_columnar for citus version >= 11.1
parent
345b465b18
commit
e06abe3534
|
@ -204,9 +204,25 @@ multi_ProcessUtility(PlannedStmt *pstmt,
|
||||||
parsetree);
|
parsetree);
|
||||||
if (strcmp(createExtensionStmt->extname, "citus") == 0)
|
if (strcmp(createExtensionStmt->extname, "citus") == 0)
|
||||||
{
|
{
|
||||||
if (get_extension_oid("citus_columnar", true) == InvalidOid)
|
double versionNumber = strtod(CITUS_MAJORVERSION, NULL);
|
||||||
|
DefElem *newVersionValue = GetExtensionOption(createExtensionStmt->options,
|
||||||
|
"new_version");
|
||||||
|
|
||||||
|
if (newVersionValue)
|
||||||
{
|
{
|
||||||
CreateExtensionWithVersion("citus_columnar", NULL);
|
const char *newVersion = defGetString(newVersionValue);
|
||||||
|
const char schemaVersionSeparator = '-';
|
||||||
|
|
||||||
|
char *leftSeperatorPosition = strchr(newVersion, schemaVersionSeparator);
|
||||||
|
versionNumber = strtod(leftSeperatorPosition, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (versionNumber >= 11.1)
|
||||||
|
{
|
||||||
|
if (get_extension_oid("citus_columnar", true) == InvalidOid)
|
||||||
|
{
|
||||||
|
CreateExtensionWithVersion("citus_columnar", NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue