default-localtimestamp-at-time-zone.patch
text/x-patch
Filename: default-localtimestamp-at-time-zone.patch
Type: text/x-patch
Part: 0
Message:
default localtimestamp at time zone
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/parser/gram.y | 13 | 0 |
diff --git i/src/backend/parser/gram.y w/src/backend/parser/gram.y
index 8fc79b6..75a27ff 100644
--- i/src/backend/parser/gram.y
+++ w/src/backend/parser/gram.y
@@ -9452,6 +9452,19 @@ b_expr: c_expr
{ $$ = $1; }
| b_expr TYPECAST Typename
{ $$ = makeTypeCast($1, $3, @2); }
+ | b_expr AT TIME ZONE b_expr
+ {
+ FuncCall *n = makeNode(FuncCall);
+ n->funcname = SystemFuncName("timezone");
+ n->args = list_make2($5, $1);
+ n->agg_order = NIL;
+ n->agg_star = FALSE;
+ n->agg_distinct = FALSE;
+ n->func_variadic = FALSE;
+ n->over = NULL;
+ n->location = @2;
+ $$ = (Node *) n;
+ }
| '+' b_expr %prec UMINUS
{ $$ = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, $2, @1); }
| '-' b_expr %prec UMINUS