Skip to content

Postgres column type timezone leads to internal server error #391

@SKoschnicke

Description

@SKoschnicke

I know that persistent 2.0 moved to using timestamptz in postgres for UTCTime fields and I suspect that existing fields of type timestamp get converted by a migration when updating to persistent 2.0. But it seems that using fields of the type timestamp is not possible anymore in the current persistent version: When having fields of type timestamp in the database and deactivated migrations, accessing a table with a timestamp field leads to an internal server error:

Incompatible {errSQLType = "timestamp", errSQLTableOid = Just (Oid 2911655112), errSQLField = "\240\197\175\SOH", errHaskellType = "UTCTime", errMessage = ""}

This is a special situation (not using migrations and needing timestamp fields) but isn't it possible to just support this field type like timestamptz is supported?

I created an application to showcase the error: https://github.com/SKoschnicke/persistent-timezone-problem

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions