我尝试执行以下命令(Postgresql):
ALTER TABLE authentication ADD CONSTRAINT overlapping_times EXCLUDE USING GIST
(method with =,
authenticator with =,
box(point(extract(epoch FROM validfrom at time zone 'UTC'),extract(epoch FROM validfrom at time zone 'UTC') ),
point(extract(epoch FROM validuntil at time zone 'UTC'), extract(epoch FROM validuntil at time zone 'UTC'))) WITH &&
)
我收到以下错误消息:
ERROR: data type character varying has no default operator class for access method "gist"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
我做了相当广泛的谷歌搜索,但仍然无法将其翻译成简单的英语。我应该怎么做才能执行上面的命令?“method”的类型是字符变化,“authenticator”是文本,“validfrom”,“validuntil”是日期。