| Документация по PostgreSQL 9.4.1 | |||
|---|---|---|---|
| Пред. | Уровень выше | Глава 48. Системные каталоги | След. |
48.37. pg_range
В каталоге pg_range хранится информация о типах диапазонов. Эта информация дополняет записи типов в pg_type.
Таблица 48-37. Колонки pg_range
| Имя | Тип | Ссылки | Описание |
|---|---|---|---|
| rngtypid | oid | pg_type.oid | OID типа диапазона |
| rngsubtype | oid | pg_type.oid | OID типа элемента (подтипа) данного типа диапазона |
| rngcollation | oid | pg_collation.oid | OID правила сортировки, применяемого для сравнения диапазонов, либо 0 в случае его отсутствия |
| rngsubopc | oid | pg_opclass.oid | OID класса операторов подтипа, применяемого для сравнения диапазонов |
| rngcanonical | regproc | pg_proc.oid | OID функции, преобразующей значение диапазона в каноническую форму, либо 0 в случае её отсутствия |
| rngsubdiff | regproc | pg_proc.oid | OID функции, возвращающей разницу между значениями двух элементов в значении double precision, либо 0 в случае её отсутствия |
Значение rngsubopc (в сочетании с rngcollation, если тип элемента сортируемый) определяет порядок сортировки для типа диапазона. Значение rngcanonical используется, когда тип элемента дискретный. Значение rngsubdiff может отсутствовать, но его рекомендуется задавать для увеличения производительности индексов GiST с диапазонным типом.
| Пред. | Начало | След. |
| pg_proc | Уровень выше | pg_rewrite |
| PostgreSQL 9.4.1 Documentation | |||
|---|---|---|---|
| Prev | Up | Chapter 48. System Catalogs | Next |
48.37. pg_range
The catalog pg_range stores information about range types. This is in addition to the types' entries in pg_type.
Table 48-37. pg_range Columns
| Name | Type | References | Description |
|---|---|---|---|
| rngtypid | oid | pg_type.oid | OID of the range type |
| rngsubtype | oid | pg_type.oid | OID of the element type (subtype) of this range type |
| rngcollation | oid | pg_collation.oid | OID of the collation used for range comparisons, or 0 if none |
| rngsubopc | oid | pg_opclass.oid | OID of the subtype's operator class used for range comparisons |
| rngcanonical | regproc | pg_proc.oid | OID of the function to convert a range value into canonical form, or 0 if none |
| rngsubdiff | regproc | pg_proc.oid | OID of the function to return the difference between two element values as double precision, or 0 if none |
rngsubopc (plus rngcollation, if the element type is collatable) determines the sort ordering used by the range type. rngcanonical is used when the element type is discrete. rngsubdiff is optional but should be supplied to improve performance of GiST indexes on the range type.