asn1oid

ASN1OID数据类型支持

概览

扩展包名版本分类许可证语言
asn1oid1.6TYPEGPL-3.0C
ID扩展名BinLibLoadCreateTrustReloc模式
3560asn1oid-
相关扩展pguecc pgcrypto prefix semver unit pgpdf pglite_fusion md5hash

版本

类型仓库版本PG 大版本包名依赖
EXTMIXED1.61817161514asn1oid-
RPMPIGSTY1.61817161514asn1oid_$v-
DEBPGDG1.61817161514postgresql-$v-asn1oid-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
el8.aarch64
el9.x86_64
el9.aarch64
el10.x86_64
el10.aarch64
d12.x86_64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
d12.aarch64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
d13.x86_64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
d13.aarch64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
u22.x86_64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
u22.aarch64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
u24.x86_64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
u24.aarch64
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6
PGDG 1.6

构建

您可以使用 pig build 命令构建 asn1oid 扩展的 RPM 包:

pig build pkg asn1oid         # 构建 RPM 包

安装

您可以直接安装 asn1oid 扩展包的预置二进制包,首先确保 PGDGPIGSTY 仓库已经添加并启用:

pig repo add pgsql -u          # 添加仓库并更新缓存

使用 pig 或者是 apt/yum/dnf 安装扩展:

pig install asn1oid;          # 当前活跃 PG 版本安装
pig ext install -y asn1oid -v 18  # PG 18
pig ext install -y asn1oid -v 17  # PG 17
pig ext install -y asn1oid -v 16  # PG 16
pig ext install -y asn1oid -v 15  # PG 15
pig ext install -y asn1oid -v 14  # PG 14
dnf install -y asn1oid_18       # PG 18
dnf install -y asn1oid_17       # PG 17
dnf install -y asn1oid_16       # PG 16
dnf install -y asn1oid_15       # PG 15
dnf install -y asn1oid_14       # PG 14
apt install -y postgresql-18-asn1oid   # PG 18
apt install -y postgresql-17-asn1oid   # PG 17
apt install -y postgresql-16-asn1oid   # PG 16
apt install -y postgresql-15-asn1oid   # PG 15
apt install -y postgresql-14-asn1oid   # PG 14

创建扩展

CREATE EXTENSION asn1oid;

用法

asn1oid: PostgreSQL 的 ASN.1 OID 数据类型

asn1oid 扩展提供了用于存储和比较 ASN.1 对象标识符(OID)的数据类型。

CREATE EXTENSION asn1oid;

SELECT '1.3.6.1.4.1'::asn1oid;
   asn1oid
─────────────
 1.3.6.1.4.1

数据类型

asn1oid 类型以点分十进制表示法存储 ASN.1 OID 值(例如 1.3.6.1.4.1.311)。这些是 SNMP、LDAP、X.509 证书和其他标准中使用的层级标识符。

运算符

支持标准比较运算符用于排序和相等判断:=<><><=>=

类型转换

该类型支持与 text 类型之间的相互转换。


最后修改 2026-03-14: update extension metadata (953cbd0)