[GENERAL] Re: Is it possible to create an index without keeping the indexed data in a column?

2014-08-01 Thread David G Johnston
Amit Langote wrote On Fri, Aug 1, 2014 at 2:50 PM, Amit Langote lt; amitlangote09@ gt; wrote: Not sure exactly if it applies here; Re-reading the OP again, perhaps it doesn't. Sorry about the noise This is a functional index which lets you store derived data in the index without having

[GENERAL] Re: Is it possible to create an index without keeping the indexed data in a column?

2014-08-01 Thread David G Johnston
larrry wrote 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

Re: [GENERAL] Re: Is it possible to create an index without keeping the indexed data in a column?

2014-08-01 Thread Larry White
Thank you David and Amit. This is more or less what I was looking for. I _think_ I might be able to store the data as TEXT, which is highly compressed by Toast, and then perhaps write the function in terms of a TEXT to JSONB conversion. I will give it a try. It might perform terribly, but will