Re: how to index a numeric(12,2) column?

From: Forest Wilkinson <fspam(at)home(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to index a numeric(12,2) column?
Date: 2000-11-08 18:49:33
Message-ID: nn7j0tgcfkl8k1mdraoq6mhvvlhvhof14a@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>> I'd like to create an index on a column whose type is NUMERIC(12,2).
>> There appears to be no default operator class for the numeric type.
>
>Uh, what version are you using? Works fine for me in 7.0.2.

Sorry; I hit send before adding that information. I'm using postgres
6.5.3 on i386 Red Hat 6.1.

It allows me to create an index on a NUMERIC(12,2) field using the
int8_ops class, but I'm wondering if this might have some undesirable
hidden side effects.

CREATE TABLE foo (id INTEGER, bar NUMERIC(12,2));
CREATE INDEX foo_idx on foo (bar int8_ops);

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-11-08 19:06:26 Re: how to index a numeric(12,2) column?
Previous Message rocael 2000-11-08 17:24:01 ./configure problems