pg_largeobject

包含大型对象数据的系统表

pg_largeobject 是一个包含大型对象 (LO) 数据的系统目录表。

pg_largeobjectPostgreSQL 7.1 中添加。

psql 命令

\dl\lo_list 列出可用的大型对象。

按 PostgreSQL 版本定义

pg_largeobject (PostgreSQL 17)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" PRIMARY KEY, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 16)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" PRIMARY KEY, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 15)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" PRIMARY KEY, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 14)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" PRIMARY KEY, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 13)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 12)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 11)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 10)

         Table "pg_catalog.pg_largeobject"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 loid   | oid     |           | not null | 
 pageno | integer |           | not null | 
 data   | bytea   |           | not null | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 9.6)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | not null
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 9.5)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | not null
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 9.4)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 9.3)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 9.2)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 9.1)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 9.0)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 8.4)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 8.3)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

pg_largeobject (PostgreSQL 8.2)

Table "pg_catalog.pg_largeobject"
 Column |  Type   | Modifiers 
--------+---------+-----------
 loid   | oid     | not null
 pageno | integer | not null
 data   | bytea   | 
Indexes:
    "pg_largeobject_loid_pn_index" UNIQUE, btree (loid, pageno)
    

文档: pg_largeobject

更改历史记录

示例

pg_largeobject 的基本用法(使用psql 的大型对象斜杠命令

postgres=# SELECT * FROM pg_largeobject;
 loid | pageno | data
------+--------+------
(0 rows)

postgres=# \lo_import /tmp/hello-world.txt
lo_import 16455

postgres=# SELECT * FROM pg_largeobject;
 loid  | pageno |             data
-------+--------+------------------------------
 16455 |      0 | \x48656c6c6f20776f726c64210a
(1 row)

postgres=# \lo_unlink 16455
lo_unlink 16455

postgres=# SELECT * FROM pg_largeobject;
 loid | pageno | data
------+--------+------
(0 rows)

分类

数据类型大型对象存储系统目录

另请参阅

pg_largeobject_metadata

反馈

提交任何关于 "pg_largeobject" 的评论、建议或更正 此处