mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
This PR adds: * complete_upgrade UDF in C; * initialize_cluster version check
40 lines
958 B
C
40 lines
958 B
C
/*-------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
*
|
|
* include/utils/version_utils.h
|
|
*
|
|
* Utilities that Provide extension functions to handle version upgrade
|
|
* scenarios.
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#include <postgres.h>
|
|
|
|
#ifndef VERSION_UTILS_PRIVATE_H
|
|
#define VERSION_UTILS_PRIVATE_H
|
|
|
|
/*
|
|
* The current Extensions' version.
|
|
* Note Extension versions are of the form
|
|
* <Major>.<Minor>-<Patch>
|
|
*/
|
|
typedef struct ExtensionVersion
|
|
{
|
|
/* The major version of the extension */
|
|
int Major;
|
|
|
|
/* The minor version of the extension */
|
|
int Minor;
|
|
|
|
/* The patch version of the extension */
|
|
int Patch;
|
|
} ExtensionVersion;
|
|
|
|
extern ExtensionVersion CurrentVersion;
|
|
|
|
void RefreshCurrentVersion(void);
|
|
|
|
bool IsExtensionVersionAtleastThis(ExtensionVersion extVersion, int major, int minor, int
|
|
patch);
|
|
#endif
|