RE: [SQL] Indexing Timestamp Data

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Romualdo Alves <romualdo(at)crn(dot)inpe(dot)br>, pgsql-sql(at)postgreSQL(dot)org
Subject: RE: [SQL] Indexing Timestamp Data
Date: 1998-05-15 20:34:18
Message-ID: F10BB1FAF801D111829B0060971D839F28AC9E@dal_cps.cpsgroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Just as a suggestion you might want to use DATETIME instead of
TIMESTAMP.

> How to index a timestamp data in a Postgres table?
>
> For example, I tried: CREATE UNIQUE INDEX idx ON table_01
> (xtime);
> The resulting message was: "CAN'T FIND A DEFAULT OPERATOR CLASS FOR
> TYPE
> 1296".
>
> The table 'table_01' was created with the following command:
> CREATE TABLE table_01 (
> xtime TIMESTAMP,
> code CHAR(5),
> qty INTEGER);
>
> The key of this table must be the 'xtime' field which is of
> TIMESTAMP data
> type. How to do it?
>
>
> Romualdo.
>
>
> ------------------------------------------------------------
> My ICQ# 10480879
> My Home Page: http://wwp.mirabilis.com/10480879
> My E-mail Express: 10480879(at)pager(dot)mirabilis(dot)com
> INPE Telephone Number: (084) 231-4733 Ext. 214
>
> "For we are labourers together with God" (1 Corinthians 3:9)
> "De Deus somos cooperadores" (1 Corintios 3:9)
> ------------------------------------------------------------

Browse pgsql-sql by date

  From Date Subject
Next Message Sean 1998-05-16 01:57:31 New User -- PG features
Previous Message Andy Lewis 1998-05-15 20:01:20 Duplicate rows