class_docstr: PostgreSQL INTERVAL type.
class_docstr_tok: ["PostgreSQL","INTERVAL","type","."]
docstr: Construct an INTERVAL.
  
  :param precision: optional integer precision value
  :param fields: string fields specifier.  allows storage of fields
   to be limited, such as ``"YEAR"``, ``"MONTH"``, ``"DAY TO HOUR"``,
   etc.
  
   .. versionadded:: 1.2
code: def __init__(
      self,
      precision: Optional[int] = None,
      fields: Optional[str] = None,
  ) -> None:
      """Construct an INTERVAL.
  
      :param precision: optional integer precision value
      :param fields: string fields specifier.  allows storage of fields
       to be limited, such as ``"YEAR"``, ``"MONTH"``, ``"DAY TO HOUR"``,
       etc.
  
       .. versionadded:: 1.2
  
      """
      self.precision = precision
      self.fields = fields
  
imports: from __future__ import annotations
  import datetime
  from typing import Any
  from typing import Optional
  from typing import overload
  from typing import Type
  from typing import TYPE_CHECKING
  from uuid import UUID
  from ...sql import sqltypes
  from ...sql import type_api
  from ...util.typing import Literal
label_desc: Use image node_id 1 to create a new INTERVAL object from inherited base classes: type_api, sqltypes with example: obj = INTERVAL(precision, fields)