class_docstr: Expression renderer for the PostgreSQL engine.
class_docstr_tok: ["Expression","renderer","for","the","PostgreSQL","engine","."]
docstr: Render time delta operations for PostgreSQL, which needs custom support for quarterly granularity.
docstr_tok: ["Render","time","delta","operations","for","PostgreSQL",",","which","needs","custom","support","for","quarterly","granularity","."]
code: def visit_time_delta_expr(
      self, node: SqlSubtractTimeIntervalExpression
  ) -> SqlExpressionRenderResult:
      """Render time delta operations for PostgreSQL, which needs custom support for quarterly granularity."""
      arg_rendered = node.arg.accept(self)
  
      count = node.count
      granularity = node.granularity
      if granularity == TimeGranularity.QUARTER:
          granularity = TimeGranularity.MONTH
          count *= 3
      return SqlExpressionRenderResult(
          sql=f"{arg_rendered.sql} - MAKE_INTERVAL({granularity.value}s => {count})",
          bind_parameters=arg_rendered.bind_parameters,
      )
  
file_path: metricflow/metricflow/sql/render/postgres.py
imports: from __future__ import annotations
  from typing import Collection
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from typing_extensions import override
  from metricflow.errors.errors import UnsupportedEngineFeatureError
  from metricflow.sql.render.expr_renderer import DefaultSqlExpressionRenderer, SqlExpressionRenderer, SqlExpressionRenderResult
  from metricflow.sql.render.sql_plan_renderer import DefaultSqlQueryPlanRenderer
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
  from metricflow.sql.sql_exprs import SqlGenerateUuidExpression, SqlPercentileExpression, SqlPercentileFunctionType, SqlSubtractTimeIntervalExpression
label_desc: Use image node_id 3 for calling the PostgresSqlExpressionRenderer obj's underlying member method code with example usage: obj.visit_time_delta_expr(node) and returns: SqlExpressionRenderResult