↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

已结束支持的版本: 7.0 / 6.5 / 6.4 / 6.3
历史版本。 PostgreSQL 7.0 已结束支持。 请参阅 当前版本手册.

51.4. 内建已注册函数

有两个内置的已注册函数 lo_import 和 lo_export,它们便于在 SQL 查询中使用。下面是一个用法的例子:

CREATE TABLE image (
    name            text,
    raster          oid
);

INSERT INTO image (name, raster)
    VALUES ('beautiful image', lo_import('/etc/motd'));

SELECT lo_export(image.raster, '/tmp/motd') from image
    WHERE name = 'beautiful image';

报告文档问题

阅读 上游文档. 反馈更正前请先核对 当前版本手册.