pg_ts_template 是一个 系统目录 表,用于定义 全文搜索 模板。
pg_ts_template 在 PostgreSQL 8.3 中添加。
按 PostgreSQL 版本定义
pg_ts_template (PostgreSQL 19)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" PRIMARY KEY, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE CONSTRAINT, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 18)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" PRIMARY KEY, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE CONSTRAINT, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 17)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" PRIMARY KEY, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE CONSTRAINT, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 16)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" PRIMARY KEY, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE CONSTRAINT, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 15)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" PRIMARY KEY, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE CONSTRAINT, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 14)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" PRIMARY KEY, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE CONSTRAINT, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 13)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 12)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
oid | oid | | not null |
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 11)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 10)
Table "pg_catalog.pg_ts_template"
Column | Type | Collation | Nullable | Default
---------------+---------+-----------+----------+---------
tmplname | name | | not null |
tmplnamespace | oid | | not null |
tmplinit | regproc | | not null |
tmpllexize | regproc | | not null |
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 9.6)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 9.5)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 9.4)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 9.3)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 9.2)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 9.1)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 9.0)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 8.4)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
pg_ts_template (PostgreSQL 8.3)
Table "pg_catalog.pg_ts_template"
Column | Type | Modifiers
---------------+---------+-----------
tmplname | name | not null
tmplnamespace | oid | not null
tmplinit | regproc | not null
tmpllexize | regproc | not null
Indexes:
"pg_ts_template_oid_index" UNIQUE, btree (oid)
"pg_ts_template_tmplname_index" UNIQUE, btree (tmplname, tmplnamespace)
文档: pg_ts_template
变更历史
自 PostgreSQL 8.3 添加以来,此表未被修改。
- PostgreSQL 8.3
- 添加(提交 140d4ebc)
示例
pg_ts_template 的典型内容
postgres=# SELECT * FROM pg_ts_template; oid | tmplname | tmplnamespace | tmplinit | tmpllexize -------+-----------+---------------+----------------+------------------ 3727 | simple | 11 | dsimple_init | dsimple_lexize 3730 | synonym | 11 | dsynonym_init | dsynonym_lexize 3733 | ispell | 11 | dispell_init | dispell_lexize 3742 | thesaurus | 11 | thesaurus_init | thesaurus_lexize 13250 | snowball | 11 | dsnowball_init | dsnowball_lexize (5 rows)
参考资料
- PostgreSQL 文档: pg_ts_template
