↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 操作符族

btree/date_ops (class)

B-tree operator class for date; member of datetime_ops.

当前阅读 PG 18·选择有来源记录的版本

此版本暂无所选语言的定义,以下显示原始英文内容。

Object kind
Operator class
Index AM
B-tree
Input type
date
Stored key type
Same as input type (catalog zero)
Default class
yes
aliases
date_ops, btree/date_ops
signature
btree/date_ops
source oid
3122

版本定义 PG 18

B-tree operator class for date; member of datetime_ops.

Family operator strategies

Operator overloadStrategyPurposeOrdering familyMembership scopeSource description
<(date,date)1searchClass input pairless than
<=(date,date)2searchClass input pairless than or equal
=(date,date)3searchClass input pairequal
>=(date,date)4searchClass input pairgreater than or equal
>(date,date)5searchClass input pairgreater than
<(date,timestamp)1searchFamily memberless than
<=(date,timestamp)2searchFamily memberless than or equal
=(date,timestamp)3searchFamily memberequal
>=(date,timestamp)4searchFamily membergreater than or equal
>(date,timestamp)5searchFamily membergreater than
<(date,timestamptz)1searchFamily memberless than
<=(date,timestamptz)2searchFamily memberless than or equal
=(date,timestamptz)3searchFamily memberequal
>=(date,timestamptz)4searchFamily membergreater than or equal
>(date,timestamptz)5searchFamily membergreater than
<(timestamp,timestamp)1searchFamily memberless than
<=(timestamp,timestamp)2searchFamily memberless than or equal
=(timestamp,timestamp)3searchFamily memberequal
>=(timestamp,timestamp)4searchFamily membergreater than or equal
>(timestamp,timestamp)5searchFamily membergreater than
<(timestamp,date)1searchFamily memberless than
<=(timestamp,date)2searchFamily memberless than or equal
=(timestamp,date)3searchFamily memberequal
>=(timestamp,date)4searchFamily membergreater than or equal
>(timestamp,date)5searchFamily membergreater than
<(timestamp,timestamptz)1searchFamily memberless than
<=(timestamp,timestamptz)2searchFamily memberless than or equal
=(timestamp,timestamptz)3searchFamily memberequal
>=(timestamp,timestamptz)4searchFamily membergreater than or equal
>(timestamp,timestamptz)5searchFamily membergreater than
<(timestamptz,timestamptz)1searchFamily memberless than
<=(timestamptz,timestamptz)2searchFamily memberless than or equal
=(timestamptz,timestamptz)3searchFamily memberequal
>=(timestamptz,timestamptz)4searchFamily membergreater than or equal
>(timestamptz,timestamptz)5searchFamily membergreater than
<(timestamptz,date)1searchFamily memberless than
<=(timestamptz,date)2searchFamily memberless than or equal
=(timestamptz,date)3searchFamily memberequal
>=(timestamptz,date)4searchFamily membergreater than or equal
>(timestamptz,date)5searchFamily membergreater than
<(timestamptz,timestamp)1searchFamily memberless than
<=(timestamptz,timestamp)2searchFamily memberless than or equal
=(timestamptz,timestamp)3searchFamily memberequal
>=(timestamptz,timestamp)4searchFamily membergreater than or equal
>(timestamptz,timestamp)5searchFamily membergreater than

Family support functions

Support numberLeft typeRight typeFunction signatureResult type
1datedatedate_cmp(date,date)int4
2datedatedate_sortsupport(internal)void
4datedatebtequalimage(oid)bool
6datedatedate_skipsupport(internal)void
1datetimestampdate_cmp_timestamp(date,timestamp)int4
1datetimestamptzdate_cmp_timestamptz(date,timestamptz)int4
1timestamptimestamptimestamp_cmp(timestamp,timestamp)int4
2timestamptimestamptimestamp_sortsupport(internal)void
4timestamptimestampbtequalimage(oid)bool
6timestamptimestamptimestamp_skipsupport(internal)void
1timestampdatetimestamp_cmp_date(timestamp,date)int4
1timestamptimestamptztimestamp_cmp_timestamptz(timestamp,timestamptz)int4
1timestamptztimestamptztimestamptz_cmp(timestamptz,timestamptz)int4
2timestamptztimestamptztimestamp_sortsupport(internal)void
4timestamptztimestamptzbtequalimage(oid)bool
6timestamptztimestamptztimestamp_skipsupport(internal)void
1timestamptzdatetimestamptz_cmp_date(timestamptz,date)int4
1timestamptztimestamptimestamptz_cmp_timestamp(timestamptz,timestamp)int4
3dateintervalin_range(date,date,interval,bool,bool)bool
3timestampintervalin_range(timestamp,timestamp,interval,bool,bool)bool
3timestamptzintervalin_range(timestamptz,timestamptz,interval,bool,bool)bool

Classes in this family

ClassInput typeKey typeDefault
date_opsdateSame as input typeyes
timestamptz_opstimestamptzSame as input typeyes
timestamp_opstimestampSame as input typeyes

比较版本

完整来源事实

class

{"default":"t","family":"datetime_ops","input_type":"date","key_type":"none","method":"btree","name":"date_ops"}

classes

map[default:t family:datetime_ops family_slug:family-btree-datetime_ops input_type:date key_type:none method:btree name:date_ops slug:class-btree-date_ops source_oid:3122], map[default:t family:datetime_ops family_slug:family-btree-datetime_ops input_type:timestamptz key_type:none method:btree name:timestamptz_ops slug:class-btree-timestamptz_ops source_oid:3127], map[default:t family:datetime_ops family_slug:family-btree-datetime_ops input_type:timestamp key_type:none method:btree name:timestamp_ops slug:class-btree-timestamp_ops source_oid:3128]

operators

map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:<(date,date) operator_slug:op-3c-date-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:<=(date,date) operator_slug:op-3c3d-date-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:=(date,date) operator_slug:op-3d-date-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:>=(date,date) operator_slug:op-3e3d-date-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:>(date,date) operator_slug:op-3e-date-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:<(date,timestamp) operator_slug:op-3c-date-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:<=(date,timestamp) operator_slug:op-3c3d-date-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:=(date,timestamp) operator_slug:op-3d-date-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:>=(date,timestamp) operator_slug:op-3e3d-date-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:>(date,timestamp) operator_slug:op-3e-date-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:<(date,timestamptz) operator_slug:op-3c-date-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:<=(date,timestamptz) operator_slug:op-3c3d-date-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:=(date,timestamptz) operator_slug:op-3d-date-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:>=(date,timestamptz) operator_slug:op-3e3d-date-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:date method:btree operator:>(date,timestamptz) operator_slug:op-3e-date-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:<(timestamp,timestamp) operator_slug:op-3c-timestamp-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:<=(timestamp,timestamp) operator_slug:op-3c3d-timestamp-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:=(timestamp,timestamp) operator_slug:op-3d-timestamp-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:>=(timestamp,timestamp) operator_slug:op-3e3d-timestamp-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:>(timestamp,timestamp) operator_slug:op-3e-timestamp-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:<(timestamp,date) operator_slug:op-3c-timestamp-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:<=(timestamp,date) operator_slug:op-3c3d-timestamp-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:=(timestamp,date) operator_slug:op-3d-timestamp-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:>=(timestamp,date) operator_slug:op-3e3d-timestamp-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:>(timestamp,date) operator_slug:op-3e-timestamp-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:<(timestamp,timestamptz) operator_slug:op-3c-timestamp-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:<=(timestamp,timestamptz) operator_slug:op-3c3d-timestamp-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:=(timestamp,timestamptz) operator_slug:op-3d-timestamp-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:>=(timestamp,timestamptz) operator_slug:op-3e3d-timestamp-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamp method:btree operator:>(timestamp,timestamptz) operator_slug:op-3e-timestamp-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:<(timestamptz,timestamptz) operator_slug:op-3c-timestamptz-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:<=(timestamptz,timestamptz) operator_slug:op-3c3d-timestamptz-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:=(timestamptz,timestamptz) operator_slug:op-3d-timestamptz-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:>=(timestamptz,timestamptz) operator_slug:op-3e3d-timestamptz-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:>(timestamptz,timestamptz) operator_slug:op-3e-timestamptz-timestamptz purpose:search result_type:bool right_type:timestamptz sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:<(timestamptz,date) operator_slug:op-3c-timestamptz-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:<=(timestamptz,date) operator_slug:op-3c3d-timestamptz-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:=(timestamptz,date) operator_slug:op-3d-timestamptz-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:>=(timestamptz,date) operator_slug:op-3e3d-timestamptz-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:>(timestamptz,date) operator_slug:op-3e-timestamptz-date purpose:search result_type:bool right_type:date sort_family: sort_family_slug: strategy:5], map[description:less than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:<(timestamptz,timestamp) operator_slug:op-3c-timestamptz-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:1], map[description:less than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:<=(timestamptz,timestamp) operator_slug:op-3c3d-timestamptz-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:2], map[description:equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:=(timestamptz,timestamp) operator_slug:op-3d-timestamptz-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:3], map[description:greater than or equal family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:>=(timestamptz,timestamp) operator_slug:op-3e3d-timestamptz-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:4], map[description:greater than family:datetime_ops family_slug:family-btree-datetime_ops left_type:timestamptz method:btree operator:>(timestamptz,timestamp) operator_slug:op-3e-timestamptz-timestamp purpose:search result_type:bool right_type:timestamp sort_family: sort_family_slug: strategy:5]

support functions

map[family:datetime_ops family_slug:family-btree-datetime_ops function:date_cmp(date,date) left_type:date method:btree number:1 result_type:int4 right_type:date], map[family:datetime_ops family_slug:family-btree-datetime_ops function:date_sortsupport(internal) left_type:date method:btree number:2 result_type:void right_type:date], map[family:datetime_ops family_slug:family-btree-datetime_ops function:btequalimage(oid) left_type:date method:btree number:4 result_type:bool right_type:date], map[family:datetime_ops family_slug:family-btree-datetime_ops function:date_skipsupport(internal) left_type:date method:btree number:6 result_type:void right_type:date], map[family:datetime_ops family_slug:family-btree-datetime_ops function:date_cmp_timestamp(date,timestamp) left_type:date method:btree number:1 result_type:int4 right_type:timestamp], map[family:datetime_ops family_slug:family-btree-datetime_ops function:date_cmp_timestamptz(date,timestamptz) left_type:date method:btree number:1 result_type:int4 right_type:timestamptz], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamp_cmp(timestamp,timestamp) left_type:timestamp method:btree number:1 result_type:int4 right_type:timestamp], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamp_sortsupport(internal) left_type:timestamp method:btree number:2 result_type:void right_type:timestamp], map[family:datetime_ops family_slug:family-btree-datetime_ops function:btequalimage(oid) left_type:timestamp method:btree number:4 result_type:bool right_type:timestamp], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamp_skipsupport(internal) left_type:timestamp method:btree number:6 result_type:void right_type:timestamp], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamp_cmp_date(timestamp,date) left_type:timestamp method:btree number:1 result_type:int4 right_type:date], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamp_cmp_timestamptz(timestamp,timestamptz) left_type:timestamp method:btree number:1 result_type:int4 right_type:timestamptz], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamptz_cmp(timestamptz,timestamptz) left_type:timestamptz method:btree number:1 result_type:int4 right_type:timestamptz], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamp_sortsupport(internal) left_type:timestamptz method:btree number:2 result_type:void right_type:timestamptz], map[family:datetime_ops family_slug:family-btree-datetime_ops function:btequalimage(oid) left_type:timestamptz method:btree number:4 result_type:bool right_type:timestamptz], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamp_skipsupport(internal) left_type:timestamptz method:btree number:6 result_type:void right_type:timestamptz], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamptz_cmp_date(timestamptz,date) left_type:timestamptz method:btree number:1 result_type:int4 right_type:date], map[family:datetime_ops family_slug:family-btree-datetime_ops function:timestamptz_cmp_timestamp(timestamptz,timestamp) left_type:timestamptz method:btree number:1 result_type:int4 right_type:timestamp], map[family:datetime_ops family_slug:family-btree-datetime_ops function:in_range(date,date,interval,bool,bool) left_type:date method:btree number:3 result_type:bool right_type:interval], map[family:datetime_ops family_slug:family-btree-datetime_ops function:in_range(timestamp,timestamp,interval,bool,bool) left_type:timestamp method:btree number:3 result_type:bool right_type:interval], map[family:datetime_ops family_slug:family-btree-datetime_ops function:in_range(timestamptz,timestamptz,interval,bool,bool) left_type:timestamptz method:btree number:3 result_type:bool right_type:interval]

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f

正文语言: en · 555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f