---
title: "yb_server_zone()"
url: "https://docs.yugabyte.com/stable/api/ysql/exprs/geo_partitioning_helper_functions/func_yb_server_zone/"
---

# yb_server_zone()

Returns the zone of the currently connected node

## Synopsis

`yb_server_zone()` returns the zone that a user's server is connected to.

## Examples

Select the zone that you're connected to:

```plpgsql
yugabyte=# SELECT yb_server_zone();
```

```output.sql
 yb_server_zone
-----------------
 us-west-1c
(1 row)
```

## Usage in Row-level geo-partitioning

Similar to [`yb_server_region()`](/stable/api/ysql/exprs/geo_partitioning_helper_functions/func_yb_server_region "yb_server_region()"), this function is also helpful while implementing [Row-level geo-partitioning](/stable/explore/multi-region-deployments/row-level-geo-partitioning/ "Row-level geo-partitioning"), as it can significantly simplify inserting rows from the user server's partition if the partitioning is based on default value of yb\_server\_zone().

## See also

- [`yb_server_cloud()`](/stable/api/ysql/exprs/geo_partitioning_helper_functions/func_yb_server_cloud "yb_server_cloud()")
- [`yb_server_region()`](/stable/api/ysql/exprs/geo_partitioning_helper_functions/func_yb_server_region "yb_server_region()")
- [`yb_is_local_table(oid)`](/stable/api/ysql/exprs/geo_partitioning_helper_functions/func_yb_is_local_table "yb_is_local_table(oid)")
