From: Greg Stark <gsstark@mit.edu>
To: Marc G. Fournier <scrappy@postgresql.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: ARRAYs and INDEXes ...
Date: 16 Aug 2005 10:59:28 -0400
Message-ID: <877jemvsfj.fsf@stark.xeocode.com> (raw)
In-Reply-To: <20050816014906.G1002@ganymede.hub.org>
References: <20050816014906.G1002@ganymede.hub.org>
"Marc G. Fournier" <scrappy@postgresql.org> writes:
> SELECT * FROM customers WHERE monthly_balance[6] = 0.00;
This, like the other poster said, can be accomplished with a set of simple
expression indexes.
> As an example ... or
>
> SELECT * FROM customers WHERE 0.00 = any (monthly_balance);
This would require a GiST index. Look at the intarray contrib module. I don't
think there's any equivalent for other data types. You might have to store
these values as fixed precision numbers and divide or multiple by 100 to
convert.
--
greg
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: gsstark@mit.edu, scrappy@postgresql.org
Subject: Re: ARRAYs and INDEXes ...
In-Reply-To: <877jemvsfj.fsf@stark.xeocode.com>
* 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