跳转到主要内容

pg_rational

以两个 32 位整数(分子/分母)表示的精确分数类型

pg_rational · 以两个 32 位整数(分子/分母)表示的精确分数类型

概览

ID扩展软件包版本类别许可证编程语言
3740pg_rationalpg_rational0.0.3TYPEMITC
属性可执行文件动态库需要预加载需要建扩展可迁移可信
--s-d--否是否是否否
关联
相关扩展unit pgmp numeral uint uint128 seg cube

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTMIXED0.0.319 18 17 16 15pg_rational-
RPMPIGSTY0.0.319 18 17 16 15pg_rational_$v-
DEBPGDG0.0.319 18 17 16 15postgresql-$v-rational-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el8.aarch64N/APIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el9.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el9.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el10.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el10.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
d12.x86_64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
d12.aarch64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
d13.x86_64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
d13.aarch64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
u22.x86_64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
u22.aarch64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
u24.x86_64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
u24.aarch64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
u26.x86_64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
u26.aarch64PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3PGDG 0.0.3
软件包版本平台仓库大小下载
pg_rational_190.0.3el9.x86_64pigsty32.8 KiBpg_rational_19-0.0.3-1PGSTY.el9.x86_64.rpm
pg_rational_190.0.3el9.aarch64pigsty32.6 KiBpg_rational_19-0.0.3-1PGSTY.el9.aarch64.rpm
pg_rational_190.0.3el10.x86_64pigsty32.9 KiBpg_rational_19-0.0.3-1PGSTY.el10.x86_64.rpm
pg_rational_190.0.3el10.aarch64pigsty33.1 KiBpg_rational_19-0.0.3-1PGSTY.el10.aarch64.rpm
postgresql-19-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-19-rational_0.0.3-2.pgdg12+1_amd64.deb
postgresql-19-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-19-rational_0.0.3-1.pgdg12+2_amd64.deb
postgresql-19-rational0.0.3d12.x86_64pgdg24.9 KiBpostgresql-19-rational_0.0.3-1.pgdg12+1_amd64.deb
postgresql-19-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-19-rational_0.0.3-2.pgdg12+1_arm64.deb
postgresql-19-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-19-rational_0.0.3-1.pgdg12+2_arm64.deb
postgresql-19-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-19-rational_0.0.3-1.pgdg12+1_arm64.deb
postgresql-19-rational0.0.3d13.x86_64pgdg25.0 KiBpostgresql-19-rational_0.0.3-2.pgdg13+1_amd64.deb
postgresql-19-rational0.0.3d13.x86_64pgdg25.0 KiBpostgresql-19-rational_0.0.3-1.pgdg13+2_amd64.deb
postgresql-19-rational0.0.3d13.x86_64pgdg25.0 KiBpostgresql-19-rational_0.0.3-1.pgdg13+1_amd64.deb
postgresql-19-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-19-rational_0.0.3-2.pgdg13+1_arm64.deb
postgresql-19-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-19-rational_0.0.3-1.pgdg13+2_arm64.deb
postgresql-19-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-19-rational_0.0.3-1.pgdg13+1_arm64.deb
postgresql-19-rational0.0.3u22.x86_64pgdg25.1 KiBpostgresql-19-rational_0.0.3-2.pgdg22.04+1_amd64.deb
postgresql-19-rational0.0.3u22.x86_64pgdg25.1 KiBpostgresql-19-rational_0.0.3-1.pgdg22.04+2_amd64.deb
postgresql-19-rational0.0.3u22.x86_64pgdg25.1 KiBpostgresql-19-rational_0.0.3-1.pgdg22.04+1_amd64.deb
postgresql-19-rational0.0.3u22.aarch64pgdg24.6 KiBpostgresql-19-rational_0.0.3-2.pgdg22.04+1_arm64.deb
postgresql-19-rational0.0.3u22.aarch64pgdg24.6 KiBpostgresql-19-rational_0.0.3-1.pgdg22.04+2_arm64.deb
postgresql-19-rational0.0.3u22.aarch64pgdg24.6 KiBpostgresql-19-rational_0.0.3-1.pgdg22.04+1_arm64.deb
postgresql-19-rational0.0.3u24.x86_64pgdg25.0 KiBpostgresql-19-rational_0.0.3-2.pgdg24.04+1_amd64.deb
postgresql-19-rational0.0.3u24.x86_64pgdg25.1 KiBpostgresql-19-rational_0.0.3-1.pgdg24.04+2_amd64.deb
postgresql-19-rational0.0.3u24.x86_64pgdg25.0 KiBpostgresql-19-rational_0.0.3-1.pgdg24.04+1_amd64.deb
postgresql-19-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-19-rational_0.0.3-2.pgdg24.04+1_arm64.deb
postgresql-19-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-19-rational_0.0.3-1.pgdg24.04+2_arm64.deb
postgresql-19-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-19-rational_0.0.3-1.pgdg24.04+1_arm64.deb
postgresql-19-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-19-rational_0.0.3-2.pgdg26.04+1_amd64.deb
postgresql-19-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-19-rational_0.0.3-1.pgdg26.04+2_amd64.deb
postgresql-19-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-19-rational_0.0.3-1.pgdg26.04+1_amd64.deb
postgresql-19-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-19-rational_0.0.3-2.pgdg26.04+1_arm64.deb
postgresql-19-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-19-rational_0.0.3-1.pgdg26.04+2_arm64.deb
postgresql-19-rational0.0.3u26.aarch64pgdg24.6 KiBpostgresql-19-rational_0.0.3-1.pgdg26.04+1_arm64.deb
软件包版本平台仓库大小下载
pg_rational_180.0.3el8.x86_64pigsty32.5 KiBpg_rational_18-0.0.3-1PGSTY.el8.x86_64.rpm
pg_rational_180.0.3el8.aarch64pigsty32.2 KiBpg_rational_18-0.0.3-1PGSTY.el8.aarch64.rpm
pg_rational_180.0.3el9.x86_64pigsty32.8 KiBpg_rational_18-0.0.3-1PGSTY.el9.x86_64.rpm
pg_rational_180.0.3el9.aarch64pigsty32.6 KiBpg_rational_18-0.0.3-1PGSTY.el9.aarch64.rpm
pg_rational_180.0.3el10.x86_64pigsty32.9 KiBpg_rational_18-0.0.3-1PGSTY.el10.x86_64.rpm
pg_rational_180.0.3el10.aarch64pigsty33.1 KiBpg_rational_18-0.0.3-1PGSTY.el10.aarch64.rpm
postgresql-18-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-18-rational_0.0.3-2.pgdg12+1_amd64.deb
postgresql-18-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-18-rational_0.0.3-1.pgdg12+2_amd64.deb
postgresql-18-rational0.0.3d12.x86_64pgdg24.9 KiBpostgresql-18-rational_0.0.3-1.pgdg12+1_amd64.deb
postgresql-18-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-18-rational_0.0.3-2.pgdg12+1_arm64.deb
postgresql-18-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-18-rational_0.0.3-1.pgdg12+2_arm64.deb
postgresql-18-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-18-rational_0.0.3-1.pgdg12+1_arm64.deb
postgresql-18-rational0.0.3d13.x86_64pgdg25.0 KiBpostgresql-18-rational_0.0.3-2.pgdg13+1_amd64.deb
postgresql-18-rational0.0.3d13.x86_64pgdg25.0 KiBpostgresql-18-rational_0.0.3-1.pgdg13+2_amd64.deb
postgresql-18-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-18-rational_0.0.3-1.pgdg13+1_amd64.deb
postgresql-18-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-18-rational_0.0.3-2.pgdg13+1_arm64.deb
postgresql-18-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-18-rational_0.0.3-1.pgdg13+2_arm64.deb
postgresql-18-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-18-rational_0.0.3-1.pgdg13+1_arm64.deb
postgresql-18-rational0.0.3u22.x86_64pgdg25.1 KiBpostgresql-18-rational_0.0.3-2.pgdg22.04+1_amd64.deb
postgresql-18-rational0.0.3u22.x86_64pgdg25.1 KiBpostgresql-18-rational_0.0.3-1.pgdg22.04+2_amd64.deb
postgresql-18-rational0.0.3u22.x86_64pgdg25.0 KiBpostgresql-18-rational_0.0.3-1.pgdg22.04+1_amd64.deb
postgresql-18-rational0.0.3u22.aarch64pgdg24.6 KiBpostgresql-18-rational_0.0.3-2.pgdg22.04+1_arm64.deb
postgresql-18-rational0.0.3u22.aarch64pgdg24.6 KiBpostgresql-18-rational_0.0.3-1.pgdg22.04+2_arm64.deb
postgresql-18-rational0.0.3u22.aarch64pgdg24.6 KiBpostgresql-18-rational_0.0.3-1.pgdg22.04+1_arm64.deb
postgresql-18-rational0.0.3u24.x86_64pgdg25.1 KiBpostgresql-18-rational_0.0.3-2.pgdg24.04+1_amd64.deb
postgresql-18-rational0.0.3u24.x86_64pgdg25.0 KiBpostgresql-18-rational_0.0.3-1.pgdg24.04+2_amd64.deb
postgresql-18-rational0.0.3u24.x86_64pgdg25.0 KiBpostgresql-18-rational_0.0.3-1.pgdg24.04+1_amd64.deb
postgresql-18-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-18-rational_0.0.3-2.pgdg24.04+1_arm64.deb
postgresql-18-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-18-rational_0.0.3-1.pgdg24.04+2_arm64.deb
postgresql-18-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-18-rational_0.0.3-1.pgdg24.04+1_arm64.deb
postgresql-18-rational0.0.3u26.x86_64pgdg24.7 KiBpostgresql-18-rational_0.0.3-2.pgdg26.04+1_amd64.deb
postgresql-18-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-18-rational_0.0.3-1.pgdg26.04+2_amd64.deb
postgresql-18-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-18-rational_0.0.3-1.pgdg26.04+1_amd64.deb
postgresql-18-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-18-rational_0.0.3-2.pgdg26.04+1_arm64.deb
postgresql-18-rational0.0.3u26.aarch64pgdg24.6 KiBpostgresql-18-rational_0.0.3-1.pgdg26.04+2_arm64.deb
postgresql-18-rational0.0.3u26.aarch64pgdg24.6 KiBpostgresql-18-rational_0.0.3-1.pgdg26.04+1_arm64.deb
软件包版本平台仓库大小下载
pg_rational_170.0.3el8.x86_64pigsty32.5 KiBpg_rational_17-0.0.3-1PGSTY.el8.x86_64.rpm
pg_rational_170.0.3el8.aarch64pigsty32.2 KiBpg_rational_17-0.0.3-1PGSTY.el8.aarch64.rpm
pg_rational_170.0.3el9.x86_64pigsty32.8 KiBpg_rational_17-0.0.3-1PGSTY.el9.x86_64.rpm
pg_rational_170.0.3el9.aarch64pigsty32.6 KiBpg_rational_17-0.0.3-1PGSTY.el9.aarch64.rpm
pg_rational_170.0.3el10.x86_64pigsty32.9 KiBpg_rational_17-0.0.3-1PGSTY.el10.x86_64.rpm
pg_rational_170.0.3el10.aarch64pigsty33.1 KiBpg_rational_17-0.0.3-1PGSTY.el10.aarch64.rpm
postgresql-17-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-17-rational_0.0.3-2.pgdg12+1_amd64.deb
postgresql-17-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-17-rational_0.0.3-1.pgdg12+2_amd64.deb
postgresql-17-rational0.0.3d12.x86_64pgdg24.9 KiBpostgresql-17-rational_0.0.3-1.pgdg12+1_amd64.deb
postgresql-17-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-17-rational_0.0.3-2.pgdg12+1_arm64.deb
postgresql-17-rational0.0.3d12.aarch64pgdg24.7 KiBpostgresql-17-rational_0.0.3-1.pgdg12+2_arm64.deb
postgresql-17-rational0.0.3d12.aarch64pgdg24.7 KiBpostgresql-17-rational_0.0.3-1.pgdg12+1_arm64.deb
postgresql-17-rational0.0.3d13.x86_64pgdg25.0 KiBpostgresql-17-rational_0.0.3-2.pgdg13+1_amd64.deb
postgresql-17-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-17-rational_0.0.3-1.pgdg13+2_amd64.deb
postgresql-17-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-17-rational_0.0.3-1.pgdg13+1_amd64.deb
postgresql-17-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-17-rational_0.0.3-2.pgdg13+1_arm64.deb
postgresql-17-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-17-rational_0.0.3-1.pgdg13+2_arm64.deb
postgresql-17-rational0.0.3d13.aarch64pgdg25.0 KiBpostgresql-17-rational_0.0.3-1.pgdg13+1_arm64.deb
postgresql-17-rational0.0.3u22.x86_64pgdg25.9 KiBpostgresql-17-rational_0.0.3-2.pgdg22.04+1_amd64.deb
postgresql-17-rational0.0.3u22.x86_64pgdg25.9 KiBpostgresql-17-rational_0.0.3-1.pgdg22.04+2_amd64.deb
postgresql-17-rational0.0.3u22.x86_64pgdg25.8 KiBpostgresql-17-rational_0.0.3-1.pgdg22.04+1_amd64.deb
postgresql-17-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-17-rational_0.0.3-2.pgdg22.04+1_arm64.deb
postgresql-17-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-17-rational_0.0.3-1.pgdg22.04+2_arm64.deb
postgresql-17-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-17-rational_0.0.3-1.pgdg22.04+1_arm64.deb
postgresql-17-rational0.0.3u24.x86_64pgdg25.0 KiBpostgresql-17-rational_0.0.3-2.pgdg24.04+1_amd64.deb
postgresql-17-rational0.0.3u24.x86_64pgdg24.9 KiBpostgresql-17-rational_0.0.3-1.pgdg24.04+2_amd64.deb
postgresql-17-rational0.0.3u24.x86_64pgdg24.9 KiBpostgresql-17-rational_0.0.3-1.pgdg24.04+1_amd64.deb
postgresql-17-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-17-rational_0.0.3-2.pgdg24.04+1_arm64.deb
postgresql-17-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-17-rational_0.0.3-1.pgdg24.04+2_arm64.deb
postgresql-17-rational0.0.3u24.aarch64pgdg25.0 KiBpostgresql-17-rational_0.0.3-1.pgdg24.04+1_arm64.deb
postgresql-17-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-17-rational_0.0.3-2.pgdg26.04+1_amd64.deb
postgresql-17-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-17-rational_0.0.3-1.pgdg26.04+2_amd64.deb
postgresql-17-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-17-rational_0.0.3-1.pgdg26.04+1_amd64.deb
postgresql-17-rational0.0.3u26.aarch64pgdg24.6 KiBpostgresql-17-rational_0.0.3-2.pgdg26.04+1_arm64.deb
postgresql-17-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-17-rational_0.0.3-1.pgdg26.04+2_arm64.deb
postgresql-17-rational0.0.3u26.aarch64pgdg24.6 KiBpostgresql-17-rational_0.0.3-1.pgdg26.04+1_arm64.deb
软件包版本平台仓库大小下载
pg_rational_160.0.3el8.x86_64pigsty32.5 KiBpg_rational_16-0.0.3-1PGSTY.el8.x86_64.rpm
pg_rational_160.0.3el8.aarch64pigsty32.2 KiBpg_rational_16-0.0.3-1PGSTY.el8.aarch64.rpm
pg_rational_160.0.3el9.x86_64pigsty32.8 KiBpg_rational_16-0.0.3-1PGSTY.el9.x86_64.rpm
pg_rational_160.0.3el9.aarch64pigsty32.6 KiBpg_rational_16-0.0.3-1PGSTY.el9.aarch64.rpm
pg_rational_160.0.3el10.x86_64pigsty32.9 KiBpg_rational_16-0.0.3-1PGSTY.el10.x86_64.rpm
pg_rational_160.0.3el10.aarch64pigsty33.1 KiBpg_rational_16-0.0.3-1PGSTY.el10.aarch64.rpm
postgresql-16-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-16-rational_0.0.3-2.pgdg12+1_amd64.deb
postgresql-16-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-16-rational_0.0.3-1.pgdg12+2_amd64.deb
postgresql-16-rational0.0.3d12.x86_64pgdg24.9 KiBpostgresql-16-rational_0.0.3-1.pgdg12+1_amd64.deb
postgresql-16-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-16-rational_0.0.3-2.pgdg12+1_arm64.deb
postgresql-16-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-16-rational_0.0.3-1.pgdg12+2_arm64.deb
postgresql-16-rational0.0.3d12.aarch64pgdg24.7 KiBpostgresql-16-rational_0.0.3-1.pgdg12+1_arm64.deb
postgresql-16-rational0.0.3d13.x86_64pgdg25.0 KiBpostgresql-16-rational_0.0.3-2.pgdg13+1_amd64.deb
postgresql-16-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-16-rational_0.0.3-1.pgdg13+2_amd64.deb
postgresql-16-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-16-rational_0.0.3-1.pgdg13+1_amd64.deb
postgresql-16-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-16-rational_0.0.3-2.pgdg13+1_arm64.deb
postgresql-16-rational0.0.3d13.aarch64pgdg25.0 KiBpostgresql-16-rational_0.0.3-1.pgdg13+2_arm64.deb
postgresql-16-rational0.0.3d13.aarch64pgdg25.0 KiBpostgresql-16-rational_0.0.3-1.pgdg13+1_arm64.deb
postgresql-16-rational0.0.3u22.x86_64pgdg26.0 KiBpostgresql-16-rational_0.0.3-2.pgdg22.04+1_amd64.deb
postgresql-16-rational0.0.3u22.x86_64pgdg25.9 KiBpostgresql-16-rational_0.0.3-1.pgdg22.04+2_amd64.deb
postgresql-16-rational0.0.3u22.x86_64pgdg25.9 KiBpostgresql-16-rational_0.0.3-1.pgdg22.04+1_amd64.deb
postgresql-16-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-16-rational_0.0.3-2.pgdg22.04+1_arm64.deb
postgresql-16-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-16-rational_0.0.3-1.pgdg22.04+2_arm64.deb
postgresql-16-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-16-rational_0.0.3-1.pgdg22.04+1_arm64.deb
postgresql-16-rational0.0.3u24.x86_64pgdg25.0 KiBpostgresql-16-rational_0.0.3-2.pgdg24.04+1_amd64.deb
postgresql-16-rational0.0.3u24.x86_64pgdg24.9 KiBpostgresql-16-rational_0.0.3-1.pgdg24.04+2_amd64.deb
postgresql-16-rational0.0.3u24.x86_64pgdg24.9 KiBpostgresql-16-rational_0.0.3-1.pgdg24.04+1_amd64.deb
postgresql-16-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-16-rational_0.0.3-2.pgdg24.04+1_arm64.deb
postgresql-16-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-16-rational_0.0.3-1.pgdg24.04+2_arm64.deb
postgresql-16-rational0.0.3u24.aarch64pgdg25.0 KiBpostgresql-16-rational_0.0.3-1.pgdg24.04+1_arm64.deb
postgresql-16-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-16-rational_0.0.3-2.pgdg26.04+1_amd64.deb
postgresql-16-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-16-rational_0.0.3-1.pgdg26.04+2_amd64.deb
postgresql-16-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-16-rational_0.0.3-1.pgdg26.04+1_amd64.deb
postgresql-16-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-16-rational_0.0.3-2.pgdg26.04+1_arm64.deb
postgresql-16-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-16-rational_0.0.3-1.pgdg26.04+2_arm64.deb
postgresql-16-rational0.0.3u26.aarch64pgdg24.6 KiBpostgresql-16-rational_0.0.3-1.pgdg26.04+1_arm64.deb
软件包版本平台仓库大小下载
pg_rational_150.0.3el8.x86_64pigsty32.5 KiBpg_rational_15-0.0.3-1PGSTY.el8.x86_64.rpm
pg_rational_150.0.3el8.aarch64pigsty32.2 KiBpg_rational_15-0.0.3-1PGSTY.el8.aarch64.rpm
pg_rational_150.0.3el9.x86_64pigsty32.8 KiBpg_rational_15-0.0.3-1PGSTY.el9.x86_64.rpm
pg_rational_150.0.3el9.aarch64pigsty32.6 KiBpg_rational_15-0.0.3-1PGSTY.el9.aarch64.rpm
pg_rational_150.0.3el10.x86_64pigsty32.9 KiBpg_rational_15-0.0.3-1PGSTY.el10.x86_64.rpm
pg_rational_150.0.3el10.aarch64pigsty33.1 KiBpg_rational_15-0.0.3-1PGSTY.el10.aarch64.rpm
postgresql-15-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-15-rational_0.0.3-2.pgdg12+1_amd64.deb
postgresql-15-rational0.0.3d12.x86_64pgdg25.0 KiBpostgresql-15-rational_0.0.3-1.pgdg12+2_amd64.deb
postgresql-15-rational0.0.3d12.x86_64pgdg24.9 KiBpostgresql-15-rational_0.0.3-1.pgdg12+1_amd64.deb
postgresql-15-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-15-rational_0.0.3-2.pgdg12+1_arm64.deb
postgresql-15-rational0.0.3d12.aarch64pgdg24.8 KiBpostgresql-15-rational_0.0.3-1.pgdg12+2_arm64.deb
postgresql-15-rational0.0.3d12.aarch64pgdg24.7 KiBpostgresql-15-rational_0.0.3-1.pgdg12+1_arm64.deb
postgresql-15-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-15-rational_0.0.3-2.pgdg13+1_amd64.deb
postgresql-15-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-15-rational_0.0.3-1.pgdg13+2_amd64.deb
postgresql-15-rational0.0.3d13.x86_64pgdg24.9 KiBpostgresql-15-rational_0.0.3-1.pgdg13+1_amd64.deb
postgresql-15-rational0.0.3d13.aarch64pgdg25.1 KiBpostgresql-15-rational_0.0.3-2.pgdg13+1_arm64.deb
postgresql-15-rational0.0.3d13.aarch64pgdg25.0 KiBpostgresql-15-rational_0.0.3-1.pgdg13+2_arm64.deb
postgresql-15-rational0.0.3d13.aarch64pgdg25.0 KiBpostgresql-15-rational_0.0.3-1.pgdg13+1_arm64.deb
postgresql-15-rational0.0.3u22.x86_64pgdg25.9 KiBpostgresql-15-rational_0.0.3-2.pgdg22.04+1_amd64.deb
postgresql-15-rational0.0.3u22.x86_64pgdg25.9 KiBpostgresql-15-rational_0.0.3-1.pgdg22.04+2_amd64.deb
postgresql-15-rational0.0.3u22.x86_64pgdg25.9 KiBpostgresql-15-rational_0.0.3-1.pgdg22.04+1_amd64.deb
postgresql-15-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-15-rational_0.0.3-2.pgdg22.04+1_arm64.deb
postgresql-15-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-15-rational_0.0.3-1.pgdg22.04+2_arm64.deb
postgresql-15-rational0.0.3u22.aarch64pgdg25.4 KiBpostgresql-15-rational_0.0.3-1.pgdg22.04+1_arm64.deb
postgresql-15-rational0.0.3u24.x86_64pgdg24.9 KiBpostgresql-15-rational_0.0.3-2.pgdg24.04+1_amd64.deb
postgresql-15-rational0.0.3u24.x86_64pgdg24.9 KiBpostgresql-15-rational_0.0.3-1.pgdg24.04+2_amd64.deb
postgresql-15-rational0.0.3u24.x86_64pgdg24.9 KiBpostgresql-15-rational_0.0.3-1.pgdg24.04+1_amd64.deb
postgresql-15-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-15-rational_0.0.3-2.pgdg24.04+1_arm64.deb
postgresql-15-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-15-rational_0.0.3-1.pgdg24.04+2_arm64.deb
postgresql-15-rational0.0.3u24.aarch64pgdg25.1 KiBpostgresql-15-rational_0.0.3-1.pgdg24.04+1_arm64.deb
postgresql-15-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-15-rational_0.0.3-2.pgdg26.04+1_amd64.deb
postgresql-15-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-15-rational_0.0.3-1.pgdg26.04+2_amd64.deb
postgresql-15-rational0.0.3u26.x86_64pgdg24.6 KiBpostgresql-15-rational_0.0.3-1.pgdg26.04+1_amd64.deb
postgresql-15-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-15-rational_0.0.3-2.pgdg26.04+1_arm64.deb
postgresql-15-rational0.0.3u26.aarch64pgdg24.7 KiBpostgresql-15-rational_0.0.3-1.pgdg26.04+2_arm64.deb
postgresql-15-rational0.0.3u26.aarch64pgdg24.6 KiBpostgresql-15-rational_0.0.3-1.pgdg26.04+1_arm64.deb

源码

pig build pkg pg_rational;		# build rpm

安装

启用 PGDG 和 PIGSTY 仓库并更新缓存。

pig repo add pgsql -u   # add both repo and update cache

使用 pig 安装扩展。

pig install pg_rational;		# install by package name

pig install pg_rational -v 19;   # install for PG 19
pig install pg_rational -v 18;   # install for PG 18
pig install pg_rational -v 17;   # install for PG 17
pig install pg_rational -v 16;   # install for PG 16
pig install pg_rational -v 15;   # install for PG 15

在数据库中创建扩展。

CREATE EXTENSION pg_rational;

用法

来源:

pg_rational 通过固定的 64 位 PostgreSQL 类型提供精确分数运算。对于必须保持精确的数值,以及需要在现有位置之间插入新位置而无需重新编号整张表的用户自定义行排序,可以使用 rational。

精确运算

CREATE EXTENSION pg_rational;

SELECT 1::rational / 3 * 3 = 1;
SELECT '1/3'::rational + '2/7'::rational;
SELECT rational_simplify('36/12');

扩展会检测算术溢出,而不是静默回绕。ratt 是用于元组强制转换的辅助类型:

SELECT 1 + (i, i + 1)::ratt
FROM generate_series(1, 5) AS i;

整数值、浮点值与有理数之间可以相互转换。浮点数转换会寻找有理数近似值;将有理数转换成浮点数则会失去精确性。

稳定的用户自定义排序

CREATE SEQUENCE todos_seq AS integer;

CREATE TABLE todos (
  prio rational UNIQUE DEFAULT nextval('todos_seq')::integer,
  what text NOT NULL
);

INSERT INTO todos (what)
VALUES ('install extension'), ('read about it'), ('try it');

UPDATE todos
SET prio = rational_intermediate(1, 2)
WHERE what = 'try it';

SELECT * FROM todos ORDER BY prio;

请使用 integer 序列,并显式转换 nextval()。该扩展有意不提供从 bigint 到 rational 的隐式转换,因为其分子受 PostgreSQL integer 范围限制。

索引、聚合与注意事项

  • rational 支持 btree 和 hash 操作符类,因此可用于排序索引和等值索引。
  • 除算术及比较操作符外,该扩展还提供 min(rational)、max(rational) 和 sum(rational) 聚合函数。
  • rational_intermediate(lower, upper) 沿 Stern-Brocot 树查找两个参数之间的分数。范围极窄时耗时会更长,而 v0.0.3 没有最大深度参数;在没有语句超时保护的情况下,不要向攻击者开放由其控制的病态边界。
  • 只有当算术运算保持在该类型的分子和分母限制内时,值才是精确的。应处理溢出错误,不要静默回退为浮点数。
  • 版本 0.0.3 主要是构建兼容性和文档发行版;面向用户的有理数运算接口保持稳定。

表格阅读器