Is it possible to create an index without keeping the indexed data in a column?

Поиск
Список
Период
Сортировка
От Larry White
Тема Is it possible to create an index without keeping the indexed data in a column?
Дата
Msg-id CAMdbzVj0ss+HhYZwWyOgffKJYa3cor_JKyCTRiUAbP-feS4NoQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is it possible to create an index without keeping the indexed data in a column?  (Michael Paquier <michael.paquier@gmail.com>)
Re: Is it possible to create an index without keeping the indexed data in a column?  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-general
Hi,

I would like to create a GIN index on a set of JSON documents. Right now I'm storing the data in a JSONB column. The current index looks like this:

CREATE INDEX document_payload_idx
  ON document
  USING gin
  (payload jsonb_path_ops);

The index is pretty small, but the actual data takes up a lot of space. Is there a way to get Postgres to index the table as if the JSON were there, but not actually put the data in the table? I could either store the docs elsewhere and keep a reference, or compress them and put them in the table in compressed form as a blob.

Thanks much for your help.

Larry 


В списке pgsql-general по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: How to implement a uniqueness constraint across multiple tables?
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: How to implement a uniqueness constraint across multiple tables?