Received: from corvette.mascari.com (dhcp26136129.columbus.rr.com [24.26.136.129]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA43080 for ; Tue, 11 Apr 2000 10:09:26 -0400 (EDT) (envelope-from mascarm@mascari.com) Received: from mascari.com (ferrari.mascari.com [192.168.2.1]) by corvette.mascari.com (8.9.3/8.9.3) with ESMTP id KAA15950; Tue, 11 Apr 2000 10:06:37 -0400 Message-ID: <38F331BB.638CA329@mascari.com> Date: Tue, 11 Apr 2000 10:07:55 -0400 From: Mike Mascari Organization: Mascari Development Inc X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.5-15 i586) X-Accept-Language: en MIME-Version: 1.0 To: Constantin Teodorescu CC: PostgreSQL Interfaces Subject: Re: No default operator type for indexes for numeric fields??? References: <38F32A73.716E1243@flex.ro> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200004/66 Constantin Teodorescu wrote: > > I have the following table structure: > > +----------+-----------------------------+-------+ > | Field | Type | Length| > +----------+-----------------------------+-------+ > | perioada | int2 not null | 2 | > | gestiune | int2 not null | 2 | > | produs | int4 not null | 4 | > | pret | numeric not null | 30.2 | > | initial | numeric not null default 0 | 25.3 | > | intrari | numeric not null default 0 | 25.3 | > | iesiri | numeric not null default 0 | 25.3 | > +----------+-----------------------------+-------+ > > Trying to create an index like > > create unique index stocuri_pkey on stocuri > (perioada,gestiune,produs,pret); > > I got the following error: > > ERROR: Can't find a default operator class for type 1700. > > How should I create an index using a numeric field? > > Constantin Teodorescu > FLEX Consulting Braila, ROMANIA According to the release history, this appears to be something that has been added for 7.0: Types ----- ... Add btree index on NUMERIC(Jan) ... Mike Mascari