Temporal Extensions

From PostgreSQL wiki
Jump to: navigation, search

Types

  • TIMESTAMP - already in PostgreSQL
  • INTERVAL - already in PostgreSQL
  • PERIOD
    • PERIOD(DATE)
    • PERIOD(TIME) and PERIOD(TIME WITH TIMEZONE)
    • PERIOD(TIMESTAMP) and PERIOD(TIMESTAMP WITH TIMEZONE)
    • PERIOD(INT) and PERIOD(INTEGER)
    • PERIOD(SMALLINT)
    • PERIOD(NUMERIC) - only with scale 0
    • PERIOD(DECIMAL) - only with scale 0

Since the TIMESTAMP and INTERVAL types are in PostgreSQL, this information will focus on the PERIOD types.

Constructors

...

Operators

In the following operators, p and q are PERIODs and i is an INTERVAL.

  • p = q
  • p PRECEDES q
  • p SUCCEEDS q
  • ...

Resources

* initial RFC - contains a lot of details and further references