Replies: 1 comment
-
|
See https://bun.uptrace.dev/postgres/postgres-data-types.html#timestamptz-vs-timestamp. You can override the type with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm working with a table that has a
timestamp without time zonefield. When performing a bulk update usingdb.NewValues, the CTE generated has the field astimestamp with time zone, which breaks further queries in my application logic.To reproduce:
The statement produced is
WITH "_data" ("val", "tf") AS (VALUES (1::BIGINT, '2022-07-28 19:27:21.576234+00:00'::TIMESTAMPTZ), (2::BIGINT, '2022-07-28 19:27:21.576234+00:00'::TIMESTAMPTZ)) UPDATE "users" AS "u" SET tf = _data.tf FROM _data WHERE (u.val = _data.val)Is there a posibillity of adding a
type:timestampstruct tag fortime.Timefields that will make them atimestampinstead oftimestamptz?Beta Was this translation helpful? Give feedback.
All reactions