跳转到主要内容

pg_base58

Base58 编码/解码函数

pg_base58 · Base58 编码/解码函数

概览

ID扩展软件包版本类别许可证编程语言
4830pg_base58pg_base580.0.1FUNCMITRust
属性可执行文件动态库需要预加载需要建扩展可迁移可信
--s-d--否是否是否否

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTPIGSTY0.0.119 18 17 16 15pg_base58-
RPMPIGSTY0.0.119 18 17 16 15pg_base58_$v-
DEBPIGSTY0.0.119 18 17 16 15postgresql-$v-pg-base58-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
el8.aarch64N/APIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
el9.x86_64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
el9.aarch64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
el10.x86_64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
el10.aarch64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
d12.x86_64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
d12.aarch64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
d13.x86_64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
d13.aarch64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
u22.x86_64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
u22.aarch64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
u24.x86_64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
u24.aarch64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
u26.x86_64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
u26.aarch64PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1PIGSTY 0.0.1
软件包版本平台仓库大小下载
pg_base58_190.0.1el9.x86_64pigsty886.7 KiBpg_base58_19-0.0.1-5PGSTY.el9.x86_64.rpm
pg_base58_190.0.1el9.aarch64pigsty847.8 KiBpg_base58_19-0.0.1-5PGSTY.el9.aarch64.rpm
pg_base58_190.0.1el10.x86_64pigsty887.6 KiBpg_base58_19-0.0.1-5PGSTY.el10.x86_64.rpm
pg_base58_190.0.1el10.aarch64pigsty850.4 KiBpg_base58_19-0.0.1-5PGSTY.el10.aarch64.rpm
postgresql-19-pg-base580.0.1d12.x86_64pigsty602.4 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~bookworm_amd64.deb
postgresql-19-pg-base580.0.1d12.aarch64pigsty525.7 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~bookworm_arm64.deb
postgresql-19-pg-base580.0.1d13.x86_64pigsty602.5 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~trixie_amd64.deb
postgresql-19-pg-base580.0.1d13.aarch64pigsty524.7 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~trixie_arm64.deb
postgresql-19-pg-base580.0.1u22.x86_64pigsty671.5 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~jammy_amd64.deb
postgresql-19-pg-base580.0.1u22.aarch64pigsty618.4 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~jammy_arm64.deb
postgresql-19-pg-base580.0.1u24.x86_64pigsty662.7 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~noble_amd64.deb
postgresql-19-pg-base580.0.1u24.aarch64pigsty612.1 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~noble_arm64.deb
postgresql-19-pg-base580.0.1u26.x86_64pigsty657.9 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~resolute_amd64.deb
postgresql-19-pg-base580.0.1u26.aarch64pigsty609.9 KiBpostgresql-19-pg-base58_0.0.1-6PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
pg_base58_180.0.1el8.x86_64pigsty850.3 KiBpg_base58_18-0.0.1-4PIGSTY.el8.x86_64.rpm
pg_base58_180.0.1el8.aarch64pigsty763.5 KiBpg_base58_18-0.0.1-4PIGSTY.el8.aarch64.rpm
pg_base58_180.0.1el9.x86_64pigsty881.4 KiBpg_base58_18-0.0.1-5PGSTY.el9.x86_64.rpm
pg_base58_180.0.1el9.aarch64pigsty841.9 KiBpg_base58_18-0.0.1-5PGSTY.el9.aarch64.rpm
pg_base58_180.0.1el10.x86_64pigsty881.5 KiBpg_base58_18-0.0.1-5PGSTY.el10.x86_64.rpm
pg_base58_180.0.1el10.aarch64pigsty843.5 KiBpg_base58_18-0.0.1-5PGSTY.el10.aarch64.rpm
postgresql-18-pg-base580.0.1d12.x86_64pigsty600.1 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~bookworm_amd64.deb
postgresql-18-pg-base580.0.1d12.aarch64pigsty522.2 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~bookworm_arm64.deb
postgresql-18-pg-base580.0.1d13.x86_64pigsty600.3 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~trixie_amd64.deb
postgresql-18-pg-base580.0.1d13.aarch64pigsty524.4 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~trixie_arm64.deb
postgresql-18-pg-base580.0.1u22.x86_64pigsty669.7 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~jammy_amd64.deb
postgresql-18-pg-base580.0.1u22.aarch64pigsty615.7 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~jammy_arm64.deb
postgresql-18-pg-base580.0.1u24.x86_64pigsty658.1 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~noble_amd64.deb
postgresql-18-pg-base580.0.1u24.aarch64pigsty609.8 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~noble_arm64.deb
postgresql-18-pg-base580.0.1u26.x86_64pigsty655.7 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~resolute_amd64.deb
postgresql-18-pg-base580.0.1u26.aarch64pigsty607.0 KiBpostgresql-18-pg-base58_0.0.1-6PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
pg_base58_170.0.1el8.x86_64pigsty847.7 KiBpg_base58_17-0.0.1-4PIGSTY.el8.x86_64.rpm
pg_base58_170.0.1el8.aarch64pigsty760.5 KiBpg_base58_17-0.0.1-4PIGSTY.el8.aarch64.rpm
pg_base58_170.0.1el9.x86_64pigsty879.5 KiBpg_base58_17-0.0.1-5PGSTY.el9.x86_64.rpm
pg_base58_170.0.1el9.aarch64pigsty837.5 KiBpg_base58_17-0.0.1-5PGSTY.el9.aarch64.rpm
pg_base58_170.0.1el10.x86_64pigsty877.8 KiBpg_base58_17-0.0.1-5PGSTY.el10.x86_64.rpm
pg_base58_170.0.1el10.aarch64pigsty838.8 KiBpg_base58_17-0.0.1-5PGSTY.el10.aarch64.rpm
postgresql-17-pg-base580.0.1d12.x86_64pigsty597.6 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~bookworm_amd64.deb
postgresql-17-pg-base580.0.1d12.aarch64pigsty521.2 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~bookworm_arm64.deb
postgresql-17-pg-base580.0.1d13.x86_64pigsty597.7 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~trixie_amd64.deb
postgresql-17-pg-base580.0.1d13.aarch64pigsty520.4 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~trixie_arm64.deb
postgresql-17-pg-base580.0.1u22.x86_64pigsty664.6 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~jammy_amd64.deb
postgresql-17-pg-base580.0.1u22.aarch64pigsty612.4 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~jammy_arm64.deb
postgresql-17-pg-base580.0.1u24.x86_64pigsty657.1 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~noble_amd64.deb
postgresql-17-pg-base580.0.1u24.aarch64pigsty607.3 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~noble_arm64.deb
postgresql-17-pg-base580.0.1u26.x86_64pigsty653.0 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~resolute_amd64.deb
postgresql-17-pg-base580.0.1u26.aarch64pigsty604.0 KiBpostgresql-17-pg-base58_0.0.1-6PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
pg_base58_160.0.1el8.x86_64pigsty846.0 KiBpg_base58_16-0.0.1-4PIGSTY.el8.x86_64.rpm
pg_base58_160.0.1el8.aarch64pigsty758.4 KiBpg_base58_16-0.0.1-4PIGSTY.el8.aarch64.rpm
pg_base58_160.0.1el9.x86_64pigsty874.6 KiBpg_base58_16-0.0.1-5PGSTY.el9.x86_64.rpm
pg_base58_160.0.1el9.aarch64pigsty835.3 KiBpg_base58_16-0.0.1-5PGSTY.el9.aarch64.rpm
pg_base58_160.0.1el10.x86_64pigsty875.1 KiBpg_base58_16-0.0.1-5PGSTY.el10.x86_64.rpm
pg_base58_160.0.1el10.aarch64pigsty836.5 KiBpg_base58_16-0.0.1-5PGSTY.el10.aarch64.rpm
postgresql-16-pg-base580.0.1d12.x86_64pigsty596.5 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~bookworm_amd64.deb
postgresql-16-pg-base580.0.1d12.aarch64pigsty519.1 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~bookworm_arm64.deb
postgresql-16-pg-base580.0.1d13.x86_64pigsty596.7 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~trixie_amd64.deb
postgresql-16-pg-base580.0.1d13.aarch64pigsty520.2 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~trixie_arm64.deb
postgresql-16-pg-base580.0.1u22.x86_64pigsty664.9 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~jammy_amd64.deb
postgresql-16-pg-base580.0.1u22.aarch64pigsty612.0 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~jammy_arm64.deb
postgresql-16-pg-base580.0.1u24.x86_64pigsty656.2 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~noble_amd64.deb
postgresql-16-pg-base580.0.1u24.aarch64pigsty605.9 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~noble_arm64.deb
postgresql-16-pg-base580.0.1u26.x86_64pigsty651.8 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~resolute_amd64.deb
postgresql-16-pg-base580.0.1u26.aarch64pigsty603.3 KiBpostgresql-16-pg-base58_0.0.1-6PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
pg_base58_150.0.1el8.x86_64pigsty836.7 KiBpg_base58_15-0.0.1-4PIGSTY.el8.x86_64.rpm
pg_base58_150.0.1el8.aarch64pigsty749.6 KiBpg_base58_15-0.0.1-4PIGSTY.el8.aarch64.rpm
pg_base58_150.0.1el9.x86_64pigsty869.4 KiBpg_base58_15-0.0.1-5PGSTY.el9.x86_64.rpm
pg_base58_150.0.1el9.aarch64pigsty827.8 KiBpg_base58_15-0.0.1-5PGSTY.el9.aarch64.rpm
pg_base58_150.0.1el10.x86_64pigsty869.5 KiBpg_base58_15-0.0.1-5PGSTY.el10.x86_64.rpm
pg_base58_150.0.1el10.aarch64pigsty828.9 KiBpg_base58_15-0.0.1-5PGSTY.el10.aarch64.rpm
postgresql-15-pg-base580.0.1d12.x86_64pigsty593.6 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~bookworm_amd64.deb
postgresql-15-pg-base580.0.1d12.aarch64pigsty516.8 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~bookworm_arm64.deb
postgresql-15-pg-base580.0.1d13.x86_64pigsty594.1 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~trixie_amd64.deb
postgresql-15-pg-base580.0.1d13.aarch64pigsty517.4 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~trixie_arm64.deb
postgresql-15-pg-base580.0.1u22.x86_64pigsty660.5 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~jammy_amd64.deb
postgresql-15-pg-base580.0.1u22.aarch64pigsty609.9 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~jammy_arm64.deb
postgresql-15-pg-base580.0.1u24.x86_64pigsty651.9 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~noble_amd64.deb
postgresql-15-pg-base580.0.1u24.aarch64pigsty602.0 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~noble_arm64.deb
postgresql-15-pg-base580.0.1u26.x86_64pigsty648.3 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~resolute_amd64.deb
postgresql-15-pg-base580.0.1u26.aarch64pigsty600.3 KiBpostgresql-15-pg-base58_0.0.1-6PGSTY~resolute_arm64.deb

源码

pig build pkg pg_base58;		# build rpm/deb

安装

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

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

使用 pig 安装扩展。

pig install pg_base58;		# install by package name

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

在数据库中创建扩展。

CREATE EXTENSION pg_base58;

用法

pg_base58: PostgreSQL 的 Base58 编解码函数

提供使用 Base58 编码对数据进行编码和解码的函数。

CREATE EXTENSION pg_base58;

函数

函数说明
base58_encode(bytea)将 bytea 数据编码为 Base58 文本
base58_decode(text)将 Base58 文本解码为 bytea

示例

-- 将字符串编码为 Base58
SELECT base58_encode('hello'::bytea);
-- 'Cn8eVZg'

-- 将 Base58 字符串解码
SELECT base58_decode('Cn8eVZg');
-- '\x68656c6c6f'  (即 'hello')

-- 往返转换
SELECT convert_from(base58_decode(base58_encode('hello'::bytea)), 'UTF8');
-- 'hello'

表格阅读器