From 93769a1f3532b07380f68113cab628dd59b97dc2 Mon Sep 17 00:00:00 2001 From: hlcianfagna <110453267+hlcianfagna@users.noreply.github.com> Date: Wed, 27 Dec 2023 15:50:54 +0000 Subject: [PATCH] Less intrusive fix --- crate.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crate.go b/crate.go index 0c1dea0..dcf5b2d 100644 --- a/crate.go +++ b/crate.go @@ -164,10 +164,11 @@ func (c crateEndpoint) write(ctx context.Context, r *crateWriteRequest) error { batch := &pgx.Batch{} for _, a := range r.rows { batch.Queue( - crateWriteStatement, + "write_statement", a.labels, a.labelsHash, - a.timestamp, + // TODO: Find non-string way of encoding timestamps. + a.timestamp.Format("2006-01-02 15:04:05.000-07"), a.value, a.valueRaw, )