Re: problem with partitioned table and indexed json field - Mailing list pgsql-general

From Raphael Bauduin
Subject Re: problem with partitioned table and indexed json field
Date
Msg-id CAONrwUEvOcajRCTA8ypB2XSQPfTub50rekSPZOt9D9E4ZAcuUw@mail.gmail.com
Whole thread Raw
In response to Re: problem with partitioned table and indexed json field  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: problem with partitioned table and indexed json field
List pgsql-general
The query is also problematic here, because it returns the full json, and not only the data I selected in the json.
Below, it should return only '_id', and not the whole json stored in event:

test3=> select max(event->>'_id') from events where event is not null;
                      max                      
------------------------------------------------
 {"_id":"5f93c3a044650105b5074c9a","type":"t2"}

Thanks

raph



On Thu, Nov 7, 2013 at 4:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Raphael Bauduin <rblists@gmail.com> writes:
> I have narrowed it a bit. It happens when I create said index on an empty
> field. Here's the scenario to reproduce it:

Thanks, I've reproduced the problem here.  The query still seems to run OK,
it's just EXPLAIN that's falling over --- do you see the same?

                        regards, tom lane



--
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: problem with partitioned table and indexed json field
Next
From: Tom Lane
Date:
Subject: Re: problem with partitioned table and indexed json field