Geo-partitioning helper functions

Geo-partitioning helper functions

This page documents the preview version (v2.21). Preview includes features under active development and is for development and testing only. For production, use the stable version (v2024.1). To learn more, see Versioning.

Synopsis

The following functions are primarily helpful while implementing Row-level geo-partitioning, as they can significantly simplify inserting rows from user's server and selecting rows from the local partition.

Function Return Type Description
yb_is_local_table(oid) boolean Returns whether the given 'oid' is a table replicated only in the local region
yb_server_region() varchar Returns the region of the currently connected node
yb_server_zone() varchar Returns the zone of the currently connected node
yb_server_cloud() varchar Returns the cloud provider of the currently connected node