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.
Category References Scenario Support for internal tables Support for foreign tables Supported version
Spatial functions PostGIS (Beta) Return spatial features, including objects, indexes, functions, and operators. Yes No V0.10 and later
Vector processing functions Vector processing Provide a high-performance vector search feature. Yes No V0.10 and later
Aggregate functions Aggregate views Allows you to pre-aggregate the data in the fixed columns of a single table. Yes No V0.10 and later
APPROX_COUNT_DISTINCT Calculates the approximate number of rows that have distinct values in a column of a table and provides better performance than the COUNT DISTINCT function. Yes Yes V0.10 and later
Traffic analysis functions Funnel analysis functions Perform funnel and retention analysis and calculate the conversion rate (CVR). Yes No V0.9 and later
Target user identification functions Identify users that meet specific conditions from a table and reduce the resource consumption of JOIN statements. Yes No V0.10 and later
Roaring bitmap functions Use efficient compressed bitmaps and can be used for deduplication, tag-based filtering, and quasi-real-time user persona analysis. Yes No V0.9 and later
Username conversion functions USER_DISPLAY_NAME Convert 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/A N/A All versions
HG_USER_DISPLAY_NAME_TO ID Convert 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/A N/A All versions
Hive-compatible function GET_JSON_OBJECT Parses a value into a JSON object. Yes No V0.9 and later
MaxCompute-compatible function MAX_PT Queries the name of the largest partitioned table for a MaxCompute table of Hologres. Yes Yes V0.9 and later
Tool functions HG_SHARD_ID_FOR_DISTRIBUTION_KEY Queries the shard IDs of a key or a composite key. N/A N/A All versions
HG_UPDATE_DATABASE_PROPERTY Modifies the properties of a database. N/A N/A All versions
SET_TABLE_PROPERTY Sets table properties and is executed with the CREATE TABLE statement. Yes N/A All versions