Sequenced Temporal Query Processing

Temporal PostgreSQL demonstrates how it is possible to extend the relational database engine to achieve a full-fledged, industrial-strength implementation of sequenced temporal queries, which intuitively are queries that are evaluated at each time point.  Our approach reduces temporal queries to nontemporal queries over data with adjusted intervals, and it leaves the processing of nontemporal queries unaffected. Specifically, the approach hinges on three concepts:  interval adjustment, timestamp propagation, and attribute scaling. Interval adjustment is enabled by introducing two new relational operators, a temporal normalizer and a temporal aligner, and the latter two concepts are enabled by the replication of timestamp attributes and the use of so-called scaling functions. 


Input: Employee N works for department D during time T.

Query: How did the average duration of contracts per department change?

Output: Temporal Aggregation (average duration of contract at each month).

Sequenced Aggregation

What are the requirements?

  • A temporal query must be reducible to a nontemporal query (performed at each month).
  • Original timestamps have to be accessible.
  • The boundaries of timestamps have to be preserved.


  • Adjustment of time intervals (through temporal normalization or temporal alignment).
  • Timestamp propagation in order to access the original timestamps.
Sequenced Query Processing

Temporal PostgreSQL

The source code (about 20MB gzipped tar archive) is available for download, it contains compilation and installation instructions as well as sample relations and queries:

Additional information about Temporal PostgreSQL you can find at

If you have any questions, comments and/or feedback please drop an email to Anton Dignös.



  • Towards a Temporal PostgreSQL.
    SFScon13, Free Software Conference, Italy, 15/11/2013, slides
  • Temporal Alignment.
    DIS Seminar Series, Free University of Bozen-Bolzano, Italy, 19/12/2012
  • Curbing Time Intervals in Database Systems.
    DIS Seminar Series, Free University of Bozen-Bolzano, Italy, 01/12/2011