another DECIMAL problem

Started by José Soaresover 26 years ago3 messages
#1José Soares
jose@sferacarta.com

Hi all,

I'm trying to create an index on a composite key using a DECIMAL type
but PostgreSQL raises the following error:

CREATE TABLE header (
year decimal(4) NOT NULL,
number INTEGER NOT NULL,
date DATE NOT NULL,
cod_client CHAR(4) NOT NULL,
CONSTRAINT k_header PRIMARY KEY (year,number)
);
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'k_header'
for tabl
e 'header'
ERROR: Can't find a default operator class for type 1700.

-----------------------------------------------------------------------
PostgreSQL 6.5.0 on i586-pc-linux-gnulibc1, compiled by gcc 2.7.2.1

Jos�

#2Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: José Soares (#1)
Re: [HACKERS] another DECIMAL problem

I'm trying to create an index on a composite key using a DECIMAL type
but PostgreSQL raises the following error:
ERROR: Can't find a default operator class for type 1700.

afaik Postgres does not yet implement indices for NUMERIC or DECIMAL.
Don't know if anyone has plans to do so...

- Thomas

--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California

#3Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Thomas Lockhart (#2)
Re: [HACKERS] another DECIMAL problem

I'm trying to create an index on a composite key using a DECIMAL type
but PostgreSQL raises the following error:
ERROR: Can't find a default operator class for type 1700.

afaik Postgres does not yet implement indices for NUMERIC or DECIMAL.
Don't know if anyone has plans to do so...

- Thomas

TODO list has:

* Add index on NUMERIC/DECIMAL type

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026