Closed mesmerx closed 4 weeks ago
usage of
tm.RegisterType(&pgtype.Type{
Name: "timestamp",
OID: pgtype.TimestampOID,
Codec: &TimestampCodec{},
})
seems to fix the issue too, but i will test more here
closing because
tm.RegisterType(&pgtype.Type{
Name: "timestamp",
OID: pgtype.TimestampOID,
Codec: &TimestampCodec{},
})
fix without messing pointers
working with https://github.com/manniwood/pgx-protobuf-timestamp i receive
cannot use TimestampCodec{} (value of type TimestampCodec) as pgtype.Codec value in struct literal: TimestampCodec does not implement pgtype.Codec (method DecodeDatabaseSQLValue has pointer receiver)
and i found that is because of timestamp have pointers where textecodec(athat works) dont have, this is to normalize the both
sems that is introduced in https://github.com/jackc/pgx/commit/8649231bb3bc00b4b9c180ce557a54ae41c28ce2 idk if its the better approach, but it need to be fixed for
to work
i believe that i can overwrite some functions to make work in my side, but i think we need to set this here