Re: ARRAYs and INDEXes ...

From: Greg Stark <gsstark(at)mit(dot)edu>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: ARRAYs and INDEXes ...
Date: 2005-08-16 14:59:28
Message-ID: 877jemvsfj.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Marc G. Fournier" <scrappy(at)postgresql(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Owen Jacobson 2005-08-16 16:25:53 Re: What libraries need to be included in C program for encrypt and decrypt functions?
Previous Message The One 2005-08-16 13:59:40 What libraries need to be included in C program for encrypt and decrypt functions?