Cannot create index on Jsonb timestamp field
От | Raschkowski, Michael |
---|---|
Тема | Cannot create index on Jsonb timestamp field |
Дата | |
Msg-id | 002401d5ca1f$8d4d2da0$a7e788e0$@auconet-it.com обсуждение исходный текст |
Ответы |
Re: Cannot create index on Jsonb timestamp field
|
Список | pgsql-bugs |
Hi,
I am checking the possibilities of using jsonb fields and can’t create index on jsonb element if I cast it to timestamp with time zone:
drop table if exists test_json;
create table test_json (j jsonb);
insert into test_json select jsonb_build_object('id',1,'time', now()::timestamptz);
--OK
create index test_json_idx1 on test_json(((j->>'id')::integer));
--ERROR
create index test_json_idx2 on test_json(((j->>'time')::timestamptz));
The message is :
ERROR: FEHLER: Funktionen im Indexausdruck müssen als IMMUTABLE markiert sein
SQL state: 42P17
Viele Grüße / Kind regards, |
Mandatory Information for business emails according to German trade laws / Pflichtangaben für geschäftliche E-mails gemäß Handelsgesetzbuch: |
В списке pgsql-bugs по дате отправления: