On Wed, 2011-10-05 at 15:35 +0200, thomas veymont wrote: > hello, > > let's say that each rows in a table contains a start time and a end > time ("timeinterval" type), > but the index are not ordered nor consecutive, e.g : I think your question has already been answered, but I thought you might be interested in: Period data type: http://pgxn.org/dist/temporal/ Or Exclusion Constraints, which can prevent overlapping ranges: http://www.postgresql.org/docs/current/static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE Also, I'm currently working on a feature called Range Types, which will hopefully be in 9.2. Regards, Jeff Davis -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general