From: Tom Lane <tgl@sss.pgh.pa.us>
To: Samuel Williams <space.ship.traveller@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Partial index on JSON column
Date: Tue, 19 Feb 2019 18:17:39 -0500
Message-ID: <27830.1550618259@sss.pgh.pa.us> (raw)
In-Reply-To: <31590.1550610877@sss.pgh.pa.us>
References: <CAHkN8V9Rfh6uAjQLURJfnHsQfC_MYiFUSWEVcwVSiPdokmkniw@mail.gmail.com>
<31590.1550610877@sss.pgh.pa.us>
I wrote:
> Try it like
> EXPLAIN SELECT COUNT(*) FROM "user_event" WHERE ((parameters ->>
> 'suggestion_id'::text) = '26') AND what = 'suggestion_notification';
> I don't think we assume that CoerceViaIO is strict, and without that
> the deduction that the value couldn't be null doesn't hold.
Hmm ... on closer inspection, we do assume that CoerceViaIO is strict,
but not everyplace knows that, so there's something that could be
improved here. In the meantime, try it as stated above.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, space.ship.traveller@gmail.com
Subject: Re: Partial index on JSON column
In-Reply-To: <27830.1550618259@sss.pgh.pa.us>
References: <CAHkN8V9Rfh6uAjQLURJfnHsQfC_MYiFUSWEVcwVSiPdokmkniw@mail.gmail.com> <31590.1550610877@sss.pgh.pa.us> <27830.1550618259@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox