September 26, 2024: PostgreSQL 17 Released!
Unsupported versions: 6.5
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

Time Interval Operators

The time interval data type tinterval is a legacy from the original date/time types and is not as well supported as the more modern types. There are several operators for this type.

Table 4-5. Postgres Time Interval Operators

Operator Description Usage
#< Interval less than?  
#<= Interval less than or equal to?  
#<> Interval not equal?  
#= Interval equal?  
#> Interval greater than?  
#>= Interval greater than or equal to?  
<#> Convert to time interval  
<< Interval less than?  
| Start of interval  
~= Same as  
<?> Time inside interval?