Thread: another DECIMAL problem

another DECIMAL problem

From
José Soares
Date:
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é



Re: [HACKERS] another DECIMAL problem

From
Thomas Lockhart
Date:
> 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


Re: [HACKERS] another DECIMAL problem

From
Bruce Momjian
Date:
> > 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
 


Re: [HACKERS] another DECIMAL problem

From
Bruce Momjian
Date:
[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
 


Re: [HACKERS] another DECIMAL problem

From
wieck@debis.com (Jan Wieck)
Date:
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) #

Re: [HACKERS] another DECIMAL problem

From
Bruce Momjian
Date:
> 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