how to create index on timestamp field in pre v7 database
От
Alex Howansky
Тема
how to create index on timestamp field in pre v7 database
Дата
Msg-id
Pine.LNX.4.21.0002241604480.17558-100000@net-srv-0001.bvrd.com
Список
Дерево обсуждения
how to create index on timestamp field in pre v7 database Alex Howansky <alex@wankwood.com>
Re: [SQL] how to create index on timestamp field in pre v7 database Tom Lane <tgl@sss.pgh.pa.us>
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/
В списке pgsql-sql по дате отправления
От: Tom Lane
Дата: