Files
documentdb/pg_documentdb/src/documentdb_extension_version.c
T
Zinan Ren 4e093b2c9d Merged PR 1545484: [OSS] Porting udfs into documentdb - part 2
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactoring
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Porting udfs into documentdb

----
#### AI description  (iteration 1)
#### PR Classification
Code cleanup and feature enhancement.

#### PR Summary
This pull request continues the porting of UDFs into DocumentDB, updating and including various SQL files for better functionality and organization.
- Updated `documentdb--0.24-0.sql` to include new UDFs and operators, replacing old function references.
- Added new UDFs for query, projection, geospatial, aggregation, metadata, schema management, index management, CRUD commands, user management, schema validation, telemetry, TTL, vector search, extension version, diagnostic, and RBAC metadata.
- Removed outdated function definitions and replaced them with updated SQL includes.
2025-01-15 07:48:41 +00:00

40 lines
1.1 KiB
C

/*-------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* src/documentdb_extension_version.c
*
* Implementation of version information for the extension.
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "utils/builtins.h"
#include "metadata/documentdb_extension_version.h"
/* exports for SQL callable functions */
PG_FUNCTION_INFO_V1(get_documentdb_api_extended_binary_version);
PG_FUNCTION_INFO_V1(get_documentdb_api_binary_version);
/* GIT_VERSION is passed in as a compiler flag during builds that have git installed */
#ifdef GIT_VERSION
#define GIT_REF " gitref: " GIT_VERSION
#else
#define GIT_REF
#endif
static const char *ExtensionVersionString = EXTENSION_VERSION_STR GIT_REF;
Datum
get_documentdb_api_extended_binary_version(PG_FUNCTION_ARGS)
{
PG_RETURN_TEXT_P(cstring_to_text(ExtensionVersionString));
}
Datum
get_documentdb_api_binary_version(PG_FUNCTION_ARGS)
{
PG_RETURN_TEXT_P(cstring_to_text(EXTENSION_VERSION_STR));
}