历史版本。 PostgreSQL 7.3 已结束支持。 请参阅 当前版本手册.
2.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';