Re: create index on a jsonb timestamp field?

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: create index on a jsonb timestamp field?
Дата
в 19:55:54
Msg-id
7511.1558295754@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
create index on a jsonb timestamp field? Larry Rosenman <ler@lerctr.org>
Re: create index on a jsonb timestamp field? Tom Lane <tgl@sss.pgh.pa.us>
Re: create index on a jsonb timestamp field? Larry Rosenman <ler@lerctr.org>
Re: create index on a jsonb timestamp field? Tom Lane <tgl@sss.pgh.pa.us>
Re: create index on a jsonb timestamp field? Larry Rosenman <ler@lerctr.org>
Larry Rosenman  writes:
> On 05/18/2019 8:17 pm, Tom Lane wrote:
>> BTW, I'd had the idea that the GENERATED option in PG v13 would allow
>> setting up this sort of case without bothering with a handwritten 
>> trigger, but it seems not:
>> 
>> regression=# create table foo(data jsonb, ts timestamptz GENERATED
>> ALWAYS AS ((data->>'ts')::timestamptz) stored);
>> psql: ERROR:  generation expression is not immutable
>> 
>> I wonder if that's really necessary to insist on?

> Good question.  Is that something the project is going to look into?

Well, I was just asking the question, not opining on whether it
was right or wrong.  GENERATED is a SQL-spec feature, and it might
be that the semantics the spec calls for wouldn't work without
the restriction.  I've not looked...

			regards, tom lane


В списке pgsql-sql по дате отправления
От: Larry Rosenman
Дата:
От: Mohamed DIA
Дата:
FAQ