Thread: another DECIMAL problem
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_headerPRIMARY 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é
> 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
> > 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, Pennsylvania19026
[Charset iso-8859-1 unsupported, filtering to ASCII...] > 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. > We have the TODO item: * 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, Pennsylvania19026
Bruce Momjian wrote: > > ERROR: Can't find a default operator class for type 1700. > > We have the TODO item: > > * Add index on NUMERIC/DECIMAL type > Nbtree operator class for NUMERIC is committed. Item closed. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #========================================= wieck@debis.com (Jan Wieck) #
> Bruce Momjian wrote: > > > > ERROR: Can't find a default operator class for type 1700. > > > > We have the TODO item: > > > > * Add index on NUMERIC/DECIMAL type > > > > Nbtree operator class for NUMERIC is committed. > > Item closed. > TODO item marked as completed: * -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, Pennsylvania19026