PostgreSQL |
---|
Prev | Chapter 43. ラージ(巨大な)オブジェクト(Large Objects) | Next |
There are two built-in registered functions, lo_import
and lo_export
which are convenient for use in SQL
queries.
SQL 問い合わせにおいて役立つ、組み込みで登録さ
れたlo_importと lo_export
という関数があります。
Here is an example of their use
これらは以下のようにして使います。
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';
(校正者への註: ファイル名はシングルクォートで囲むように修正しました
コメント以外は訳すのを遠慮することにしました。)