Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing interval into CalendarDiffTime fails in PostgreSQL #601

Open
tysonzero opened this issue Jun 22, 2024 · 1 comment
Open

Parsing interval into CalendarDiffTime fails in PostgreSQL #601

tysonzero opened this issue Jun 22, 2024 · 1 comment

Comments

@tysonzero
Copy link

I get a ConversionFailed exception with:

  • errSQLType = "interval"
  • errHaskellType = "CalendarDiffTime"

and a few different possible error messages depending on the value:

  • errMessage = "Failed reading: no parse of \"00:00:00\""
  • errMessage = "Failed reading: no parse of \"00:00:01\""
  • errMessage = "Failed reading: no parse of \"1 mon\""

Note that writing seems to work just fine, I was able to insert the above rows without issue, I just can't selectTable them back.

@tysonzero
Copy link
Author

Ah oops I just read the note, works fine with intervalstyle configured appropriately. Could still be nice to not require that setting change, although from following the code it seems like the parsing code lives in postgresql-simple anyway. Feel free to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant