Skip to content

pg dat.NullTime still causes 'cannot parse time errors' (Different format for timestamps without timezone) #41

Description

@vinzenz
dat_test=# create table test (time timestamp without time zone NOT NULL DEFAULT (now() AT TIME ZONE 'utc'), name TEXT NOT NULL);
CREATE TABLE
dat_test=# insert into test (name) VALUES('Hello');
INSERT 0 1
dat_test=# select row_to_json(fields.*) FROM (SELECT * FROM test) as fields;
                     row_to_json                      
------------------------------------------------------
 {"time":"2016-03-02T10:30:26.256081","name":"Hello"}
(1 row)

It seems like that postgres, at least with version 9.5, if using a row without timestamp without time zone
reports the data in the above format

When adding "2006-01-02T15:04:05.000000" to the supported formats, in types.go, it works

Edit: Additional note: this happens when using SelectDoc only of course but I think that's clear to you when you see the row_to_json

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions