跳转到主要内容

pgpm-base32

PostgreSQL 中的 Base32 编码与解码函数

pgpm-base32 · PostgreSQL 中的 Base32 编码与解码函数

概览

ID扩展软件包版本类别许可证编程语言
101675pgpm-base32pgpm-base320.15.5UTILMITPLpgSQL

用法

来源:

pgpm-base32 — @pgpm/base32 是一个完全使用 plpgsql 实现 Base32 编码和解码的扩展。请在相应的 SQL 或数据库实用程序工作流中使用它。在集成到应用程序 SQL 之前,必须先安装并验证其扩展依赖项。

核心工作流

CREATE EXTENSION "pgpm-base32";

在目标数据库中安装扩展,当可用时运行上游最小示例,并在将其集成到应用程序 SQL 之前验证已安装的版本和返回值。

重要对象

  • base32.base32_alphabet(input int) 是一个扩展函数,返回 char。
  • base32.base32_alphabet_to_decimal(input text) 是一个扩展函数,返回 text。
  • base32.base32_alphabet_to_decimal_int(input text) 是一个扩展函数,返回 int。
  • base32.base32_to_decimal(input text) 是一个扩展函数,返回 text[]。
  • base32.binary_to_int(input text) 是一个扩展函数,返回 int。
  • base32.decimal_to_chunks(input text[]) 是一个扩展函数,返回 text[]。
  • base32.decode(input text) 是一个扩展函数,返回 text。
  • base32.encode(input text) 是一个扩展函数,返回 text。
  • base32.fill_chunks(input text[]) 是一个扩展函数,返回 text[]。
  • base32.string_nchars(text, int) 是一个扩展函数,返回 text[]。
  • base32.to_ascii(input text) 是一个扩展函数,返回 int[]。
  • base32.to_base32(input text[]) 是一个扩展函数,返回 text。
  • base32.to_binary(input int) 是一个扩展函数,返回 text。
  • base32.to_binary(input int[]) 是一个扩展函数,返回 text[]。

要求与注意事项

  • 审核的控制文件声明默认版本为 0.15.5。
  • 先安装并验证确认的扩展依赖项:pgcrypto, plpgsql, pgpm-verify。
  • 控制文件标记该扩展为不可重定位。
  • 控制文件不要求超级用户安装。
  • 在生产使用前,请确认权限、支持的 PostgreSQL 版本、升级行为和失败情况。

表格阅读器