Я не могу создать исключающий индекс с этой схемой.
create table foo_bar(
foo_id text primary key,
bar char(3) not null,
created_at timestamptz not null default current_timestamp,
system_period tstzrange not null default tstzrange(current_timestamp, null),
exclude using gist (system_period with &&)
);
create table foo_bar_history(like foo_bar);
alter table foo_bar_history add constraint exclude using gist (system_period with &&);
Последняя строка таблицы изменений здесь не получается с
SQL Error [42601]: ERROR: syntax error at or near "using"
Я дважды проверил документы,но я действительно не вижу, что я делаю здесь не так.
PostgreSQL 9.6.9 на x86_64-pc-linux-gnu, скомпилированный gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.064-битный