agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tim Dudgeon <tdudgeon.ml@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: querying within json
Date: Thu, 30 Oct 2014 19:22:07 +0000
Message-ID: <54528FDF.6070807@gmail.com> (raw)
In-Reply-To: <1414687726277-5825055.post@n5.nabble.com>
References: <CAP=hSSfiqaxt7NFi8qUEjKrH=te_cFXDfOfZ9PYEhcJRC+oGMg@mail.gmail.com>
<CAFzmHiX5oXGe+kgatVNaq5QqB_BrADtZczHo79x+R4Pecn3vCw@mail.gmail.com>
<54526655.2010306@gmail.com>
<1414687726277-5825055.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
On 30/10/2014 16:48, David G Johnston wrote:
>>> CREATE INDEX idxgin_numeric_prop ON atable USING
>>> gin((json_col->'numeric_prop'));
>> I can add the index, but no evidence of it being used when I run a query
>> like this:
>> select * from atable where (json_col->>'numeric_prop')::numeric < 100;
> The index is storing text while the expression has been cast to numeric so,
> no, if what is shown above is exactly what you did then you would not be
> using the index.
So I tried to create the index to make it a numeric index using a cast
(won't show the failed details) but failed.
Any suggestions on how to do this?
Tim
>
>
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/querying-within-json-tp5825042p5825055.html
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
view thread (5+ messages)
Message-ID: <54528FDF.6070807@gmail.com>
Permalink: ../54528FDF.6070807@gmail.com/
Also on: postgresql.org/message-id/54528FDF.6070807@gmail.com
reply
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tdudgeon.ml@gmail.com
Subject: Re: querying within json
In-Reply-To: <54528FDF.6070807@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox