how to create index on timestamp field in pre v7 database

From: Alex Howansky <alex(at)wankwood(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: how to create index on timestamp field in pre v7 database
Date: 2000-02-24 22:27:21
Message-ID: Pine.LNX.4.21.0002241604480.17558-100000@net-srv-0001.bvrd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql


This page:

http://www.postgresql.org/docs/postgres/datatype1033.htm

says to use timestamp in preference to datetime. It also says that datetime is
"equivalent to timestamp". Ok, so I'll use timestamp, no prob. But I want to
index that field. In v6.5.3, there is no timestamp_ops, only datetime_ops. In
v7.0b1 the datetime_ops is gone, and there is a timestamp_ops available, which
takes care of my problem. But until I put 7.0 on my production server, I can't
make an index on a timestamp field. My question is, how "equivalent" are these
types? Can I use datetime_ops to index a timestamp field in a v6.5.3 database?
I.e., can I do this:

create table thing ( bleh text, blah timetamp );
create index thing_blah on thing ( blah datetime_ops );

It runs without error, but is it legit? TIA...

--
Alex Howansky
Wankwood Associates
http://www.wankwood.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2000-02-24 22:37:30 Re: AW: AW: AW: .... (off-topic)
Previous Message Roberto Cornacchia 2000-02-24 21:41:25 Re: about 7.0 LIMIT optimization

Browse pgsql-sql by date

  From Date Subject
Next Message M.Mazurek 2000-02-24 22:38:48 date_part, too many results?
Previous Message Tom Lane 2000-02-24 22:14:03 Re: [SQL] cache lookup failed