tzf
快速根据GPS经纬度坐标查找时区
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
pg_tzf | 0.2.4 | GIS | MIT | Rust |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 1680 | tzf | 否 | 是 | 否 | 是 | 否 | 否 | - |
| 相关扩展 | postgis geoip pg_cron postgis_topology postgis_raster postgis_sfcgal postgis_tiger_geocoder address_standardizer |
|---|
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.2.4 | 1817161514 | pg_tzf | - |
| RPM | PIGSTY | 0.2.4 | 1817161514 | pg_tzf_$v | - |
| DEB | PIGSTY | 0.2.4 | 1817161514 | postgresql-$v-tzf | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.2.4 el8.x86_64.pg18 : pg_tzf_18 pg_tzf_18-0.2.4-1PIGSTY.el8.x86_64.rpm
| PIGSTY 0.2.4 el8.x86_64.pg17 : pg_tzf_17 pg_tzf_17-0.2.4-1PIGSTY.el8.x86_64.rpm
| PIGSTY 0.2.4 el8.x86_64.pg16 : pg_tzf_16 pg_tzf_16-0.2.4-1PIGSTY.el8.x86_64.rpm
| PIGSTY 0.2.4 el8.x86_64.pg15 : pg_tzf_15 pg_tzf_15-0.2.4-1PIGSTY.el8.x86_64.rpm
| PIGSTY 0.2.4 el8.x86_64.pg14 : pg_tzf_14 pg_tzf_14-0.2.4-1PIGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 0.2.4 el8.aarch64.pg18 : pg_tzf_18 pg_tzf_18-0.2.4-1PIGSTY.el8.aarch64.rpm
| PIGSTY 0.2.4 el8.aarch64.pg17 : pg_tzf_17 pg_tzf_17-0.2.4-1PIGSTY.el8.aarch64.rpm
| PIGSTY 0.2.4 el8.aarch64.pg16 : pg_tzf_16 pg_tzf_16-0.2.4-1PIGSTY.el8.aarch64.rpm
| PIGSTY 0.2.4 el8.aarch64.pg15 : pg_tzf_15 pg_tzf_15-0.2.4-1PIGSTY.el8.aarch64.rpm
| PIGSTY 0.2.4 el8.aarch64.pg14 : pg_tzf_14 pg_tzf_14-0.2.4-1PIGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 0.2.4 el9.x86_64.pg18 : pg_tzf_18 pg_tzf_18-0.2.4-1PIGSTY.el9.x86_64.rpm
| PIGSTY 0.2.4 el9.x86_64.pg17 : pg_tzf_17 pg_tzf_17-0.2.4-1PIGSTY.el9.x86_64.rpm
| PIGSTY 0.2.4 el9.x86_64.pg16 : pg_tzf_16 pg_tzf_16-0.2.4-1PIGSTY.el9.x86_64.rpm
| PIGSTY 0.2.4 el9.x86_64.pg15 : pg_tzf_15 pg_tzf_15-0.2.4-1PIGSTY.el9.x86_64.rpm
| PIGSTY 0.2.4 el9.x86_64.pg14 : pg_tzf_14 pg_tzf_14-0.2.4-1PIGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 0.2.4 el9.aarch64.pg18 : pg_tzf_18 pg_tzf_18-0.2.4-1PIGSTY.el9.aarch64.rpm
| PIGSTY 0.2.4 el9.aarch64.pg17 : pg_tzf_17 pg_tzf_17-0.2.4-1PIGSTY.el9.aarch64.rpm
| PIGSTY 0.2.4 el9.aarch64.pg16 : pg_tzf_16 pg_tzf_16-0.2.4-1PIGSTY.el9.aarch64.rpm
| PIGSTY 0.2.4 el9.aarch64.pg15 : pg_tzf_15 pg_tzf_15-0.2.4-1PIGSTY.el9.aarch64.rpm
| PIGSTY 0.2.4 el9.aarch64.pg14 : pg_tzf_14 pg_tzf_14-0.2.4-1PIGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 0.2.4 el10.x86_64.pg18 : pg_tzf_18 pg_tzf_18-0.2.4-1PIGSTY.el10.x86_64.rpm
| PIGSTY 0.2.4 el10.x86_64.pg17 : pg_tzf_17 pg_tzf_17-0.2.4-1PIGSTY.el10.x86_64.rpm
| PIGSTY 0.2.4 el10.x86_64.pg16 : pg_tzf_16 pg_tzf_16-0.2.4-1PIGSTY.el10.x86_64.rpm
| PIGSTY 0.2.4 el10.x86_64.pg15 : pg_tzf_15 pg_tzf_15-0.2.4-1PIGSTY.el10.x86_64.rpm
| PIGSTY 0.2.4 el10.x86_64.pg14 : pg_tzf_14 pg_tzf_14-0.2.4-1PIGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 0.2.4 el10.aarch64.pg18 : pg_tzf_18 pg_tzf_18-0.2.4-1PIGSTY.el10.aarch64.rpm
| PIGSTY 0.2.4 el10.aarch64.pg17 : pg_tzf_17 pg_tzf_17-0.2.4-1PIGSTY.el10.aarch64.rpm
| PIGSTY 0.2.4 el10.aarch64.pg16 : pg_tzf_16 pg_tzf_16-0.2.4-1PIGSTY.el10.aarch64.rpm
| PIGSTY 0.2.4 el10.aarch64.pg15 : pg_tzf_15 pg_tzf_15-0.2.4-1PIGSTY.el10.aarch64.rpm
| PIGSTY 0.2.4 el10.aarch64.pg14 : pg_tzf_14 pg_tzf_14-0.2.4-1PIGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 0.2.4 d12.x86_64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~bookworm_amd64.deb
| PIGSTY 0.2.4 d12.x86_64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~bookworm_amd64.deb
| PIGSTY 0.2.4 d12.x86_64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~bookworm_amd64.deb
| PIGSTY 0.2.4 d12.x86_64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~bookworm_amd64.deb
| PIGSTY 0.2.4 d12.x86_64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 0.2.4 d12.aarch64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~bookworm_arm64.deb
| PIGSTY 0.2.4 d12.aarch64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~bookworm_arm64.deb
| PIGSTY 0.2.4 d12.aarch64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~bookworm_arm64.deb
| PIGSTY 0.2.4 d12.aarch64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~bookworm_arm64.deb
| PIGSTY 0.2.4 d12.aarch64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 0.2.4 d13.x86_64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~trixie_amd64.deb
| PIGSTY 0.2.4 d13.x86_64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~trixie_amd64.deb
| PIGSTY 0.2.4 d13.x86_64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~trixie_amd64.deb
| PIGSTY 0.2.4 d13.x86_64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~trixie_amd64.deb
| PIGSTY 0.2.4 d13.x86_64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 0.2.4 d13.aarch64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~trixie_arm64.deb
| PIGSTY 0.2.4 d13.aarch64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~trixie_arm64.deb
| PIGSTY 0.2.4 d13.aarch64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~trixie_arm64.deb
| PIGSTY 0.2.4 d13.aarch64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~trixie_arm64.deb
| PIGSTY 0.2.4 d13.aarch64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 0.2.4 u22.x86_64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~jammy_amd64.deb
| PIGSTY 0.2.4 u22.x86_64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~jammy_amd64.deb
| PIGSTY 0.2.4 u22.x86_64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~jammy_amd64.deb
| PIGSTY 0.2.4 u22.x86_64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~jammy_amd64.deb
| PIGSTY 0.2.4 u22.x86_64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 0.2.4 u22.aarch64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~jammy_arm64.deb
| PIGSTY 0.2.4 u22.aarch64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~jammy_arm64.deb
| PIGSTY 0.2.4 u22.aarch64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~jammy_arm64.deb
| PIGSTY 0.2.4 u22.aarch64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~jammy_arm64.deb
| PIGSTY 0.2.4 u22.aarch64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 0.2.4 u24.x86_64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~noble_amd64.deb
| PIGSTY 0.2.4 u24.x86_64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~noble_amd64.deb
| PIGSTY 0.2.4 u24.x86_64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~noble_amd64.deb
| PIGSTY 0.2.4 u24.x86_64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~noble_amd64.deb
| PIGSTY 0.2.4 u24.x86_64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 0.2.4 u24.aarch64.pg18 : postgresql-18-tzf postgresql-18-tzf_0.2.4-1PIGSTY~noble_arm64.deb
| PIGSTY 0.2.4 u24.aarch64.pg17 : postgresql-17-tzf postgresql-17-tzf_0.2.4-1PIGSTY~noble_arm64.deb
| PIGSTY 0.2.4 u24.aarch64.pg16 : postgresql-16-tzf postgresql-16-tzf_0.2.4-1PIGSTY~noble_arm64.deb
| PIGSTY 0.2.4 u24.aarch64.pg15 : postgresql-15-tzf postgresql-15-tzf_0.2.4-1PIGSTY~noble_arm64.deb
| PIGSTY 0.2.4 u24.aarch64.pg14 : postgresql-14-tzf postgresql-14-tzf_0.2.4-1PIGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u26.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
构建
您可以使用 pig build 命令构建 pg_tzf 扩展的 RPM / DEB 包:
pig build pkg pg_tzf # 构建 RPM / DEB 包
安装
您可以直接安装 pg_tzf 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
pig repo add pgsql -u # 添加仓库并更新缓存
使用 pig 或者是 apt/yum/dnf 安装扩展:
pig install pg_tzf; # 当前活跃 PG 版本安装
pig ext install -y pg_tzf -v 18 # PG 18
pig ext install -y pg_tzf -v 17 # PG 17
pig ext install -y pg_tzf -v 16 # PG 16
pig ext install -y pg_tzf -v 15 # PG 15
pig ext install -y pg_tzf -v 14 # PG 14
dnf install -y pg_tzf_18 # PG 18
dnf install -y pg_tzf_17 # PG 17
dnf install -y pg_tzf_16 # PG 16
dnf install -y pg_tzf_15 # PG 15
dnf install -y pg_tzf_14 # PG 14
apt install -y postgresql-18-tzf # PG 18
apt install -y postgresql-17-tzf # PG 17
apt install -y postgresql-16-tzf # PG 16
apt install -y postgresql-15-tzf # PG 15
apt install -y postgresql-14-tzf # PG 14
创建扩展:
CREATE EXTENSION tzf;
用法
tzf 是一个 PostgreSQL 扩展,用于根据经纬度快速查找时区名称。
创建扩展
CREATE EXTENSION tzf;
上游项目按 PostgreSQL major version 分别打包构建产物。当前源码元数据声明的扩展版本是 0.2.4。
函数
坐标查找
SELECT tzf_tzname(116.3883, 39.9289) AS timezone;
批量坐标查找
SELECT unnest(
tzf_tzname_batch(
ARRAY[-74.0060, -118.2437, 139.6917],
ARRAY[40.7128, 34.0522, 35.6895]
)
) AS timezones;
点查找
SELECT tzf_tzname_point(point(-74.0060, 40.7128)) AS timezone;
批量点查找
SELECT unnest(
tzf_tzname_batch_points(
ARRAY[
point(-74.0060, 40.7128),
point(-118.2437, 34.0522),
point(139.6917, 35.6895)
]
)
) AS timezones;
说明
- 上游 README 记录其支持 PostgreSQL 14 到 18 的构建。
- 预编译发布包内包含
tzf.so、tzf.control和tzf--<version>.sql。 - 当前 README 仍指向
sql/tzf.sql中的完整 schema,并附带这四个查找函数的 benchmark 数据。