Thread: Can't find a default operator class for type 1296.

Can't find a default operator class for type 1296.

From
Martin Neumann
Date:
This occured when I was creating a table:

---------------snip-----------------------------------------------
CREATE TABLE kurse (
  wkn    text      NOT NULL,
  datum  timestamp NOT NULL,
  ausg   float4,
  rueckn float4,
  zg     float4,
  aussch float4,
  PRIMARY KEY (wkn,datum)
);
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'kurse_pkey' for table 'kurse'
ERROR:  Can't find a default operator class for type 1296.
wp=> SELECT version();
version
-------------------------------------------------------------
PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc 2.95.2
(1 row)
---------------snip-----------------------------------------------

Changing 'datum' to type datetime helps, but datetime is deprecated in
PostgreSQL 7.0.

Does this work in 7.0 beta?

--
Martin Neumann, Welkenrather Str. 118c, 52074 Aachen, Germany
mne@mne.de - http://www.mne.de/mne/ - sms@mne.de [eMail2SMS]
Tel. 0241 / 8876-080 - Mobil: 0173 / 27 69 632
..------.---------------------------------------------------------
|  at  | Inform GmbH - Abteilung Airport Logistics
| work | Pascalstr. 23 - 52076 Aachen - Tel. 02408 / 9456-0
|______| martin.neumann@inform-ac.com - http://www.inform-ac.com

Re: [BUGS] Can't find a default operator class for type 1296.

From
Peter Eisentraut
Date:
Martin Neumann writes:

> CREATE TABLE kurse (
>   wkn    text      NOT NULL,
>   datum  timestamp NOT NULL,
>   ausg   float4,
>   rueckn float4,
>   zg     float4,
>   aussch float4,
>   PRIMARY KEY (wkn,datum)
> );
> NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'kurse_pkey' for table 'kurse'
> ERROR:  Can't find a default operator class for type 1296.

> Does this work in 7.0 beta?

Yes.

As I understand it, all the 'timestamp' code came from 'datetime'. The old
'timestamp' was a little stupid, so to say.

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden