You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently require the RHS of AT TIME ZONE operator to be a string literal, but in postgres, it's allowed to be an expression. For example, an expression such as <timestamp> AT TIME ZONE ('America/' || some_column) is accepted. This change would make Expr::AtTimeZone isomorphic to Expr::BinaryOp, so when implementing this I suggest we eliminate Expr::AtTimeZone and add BinaryOperator::AtTimeZone.
We'll need to be careful to get the precedence right. In <timestamp> AT TIME ZONE 'America/Los Angeles'::text the cast is on the time zone string literal, but in <timestamp> AT TIME ZONE 'America/Los Angeles' || 'foo' it's concatenating the result of the entirely AT TIME ZONE binop (which is implicitly casted into text).
The text was updated successfully, but these errors were encountered:
We currently require the RHS of
AT TIME ZONE
operator to be a string literal, but in postgres, it's allowed to be an expression. For example, an expression such as<timestamp> AT TIME ZONE ('America/' || some_column)
is accepted. This change would makeExpr::AtTimeZone
isomorphic toExpr::BinaryOp
, so when implementing this I suggest we eliminateExpr::AtTimeZone
and addBinaryOperator::AtTimeZone
.We'll need to be careful to get the precedence right. In
<timestamp> AT TIME ZONE 'America/Los Angeles'::text
the cast is on the time zone string literal, but in<timestamp> AT TIME ZONE 'America/Los Angeles' || 'foo'
it's concatenating the result of the entirelyAT TIME ZONE
binop (which is implicitly casted into text).The text was updated successfully, but these errors were encountered: