pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
No default operator type for indexes for numeric fields???
2+ messages / 2 participants
[nested] [flat]

* No default operator type for indexes for numeric fields???
@ 2000-04-11 13:36 Constantin Teodorescu <teo@flex.ro>
  2000-04-11 14:07 ` Re: No default operator type for indexes for numeric fields??? Mike Mascari <mascarm@mascari.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Constantin Teodorescu @ 2000-04-11 13:36 UTC (permalink / raw)
  To: pgsql-interfaces

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: No default operator type for indexes for numeric fields???
  2000-04-11 13:36 No default operator type for indexes for numeric fields??? Constantin Teodorescu <teo@flex.ro>
@ 2000-04-11 14:07 ` Mike Mascari <mascarm@mascari.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Mike Mascari @ 2000-04-11 14:07 UTC (permalink / raw)
  To: Constantin Teodorescu <teo@flex.ro>; +Cc: pgsql-interfaces

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-04-11 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-04-11 13:36 No default operator type for indexes for numeric fields??? Constantin Teodorescu <teo@flex.ro>
2000-04-11 14:07 ` Mike Mascari <mascarm@mascari.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox