This topic describes the extension functions provided by Hologres.

Hologres is compatible with PostgreSQL. You can use Hologres functions in the same way as PostgreSQL functions.

The functions supported by Hologres are a subset of the PostgreSQL functions. In actual use, PostgreSQL functions may not meet all your business requirements. Hologres provides some extension functions to simplify your business development.

The following table describes the extension functions that are supported by Hologres.
CategoryReferencesScenarioSupport for internal tablesSupport for foreign tablesSupported version
Spatial functionsPostGIS for geographic information analysisReturn spatial features, including objects, indexes, functions, and operators. YesNoV0.10 and later
Vector processing functionsVector processing based on ProximaProvide a high-performance vector search feature. YesNoV0.10 and later
APPROX_COUNT_DISTINCTCalculates the approximate number of rows that have distinct values in a column of a table and provides better performance than the COUNT DISTINCT function. YesYesV0.10 and later
Traffic analysis functionsFunnel analysis functionsPerform funnel and retention analysis and calculate the conversion rate (CVR). YesNoV0.9 and later
Intended user identification functionsIdentify users that meet specific conditions from a table and reduce the resource consumption of JOIN statements. YesNoV0.10 and later
Roaring bitmap functionsUse efficient compressed bitmaps and can be used for deduplication, tag-based filtering, and quasi-real-time user persona analysis. YesNoV0.9 and later
Username conversion functionsUSER_DISPLAY_NAMEConvert the ID of an account in Hologres into the email address of an Alibaba Cloud account or a string that indicates a RAM user. N/AN/AAll versions
HG_DISPLAY_NAME_TO _IDConvert the email address of an Alibaba Cloud account or a string that indicates a RAM user into the ID of an account in Hologres. N/AN/AAll versions
Hive-compatible functionGET_JSON_OBJECTParses a value into a JSON object. YesNoV0.9 and later
MaxCompute-compatible functionMAX_PTQueries the name of the largest partitioned table for a MaxCompute table of Hologres. YesYesV0.9 and later
Tool functionsHG_VERSIONQueries the information about the current version of Hologres. N/AN/AAll versions
HG_UPDATE_DATABASE_PROPERTYModifies the properties of a database. N/AN/AAll versions
SET_TABLE_PROPERTYSets table properties and is executed with the CREATE TABLE statement. YesN/AAll versions