lpsmith / postgresql-simple

Mid-level client library for accessing PostgreSQL from Haskell
Other
206 stars 71 forks source link

Fix off-by-one error in year builder. #230

Closed nathanfhunter closed 6 years ago

nathanfhunter commented 6 years ago

This bug bit me when I was stress-testing some event-generation code at my job. Before fixing this bug, I was getting this result: ghci λ: toField (fromGregorian 10000 1 1) Plain "':000-01-01'" After the fix, it works like this: ghci λ: toField (fromGregorian 10000 1 1) Plain "'10000-01-01'"

lpsmith commented 6 years ago

Damn. Thanks! I'll try to add a regression test, get around to dealing with a few other open issues, and get this out sometime soon-ish. (Unfortunately, I've neglected my OSS work lately.)

nathanfhunter commented 6 years ago

No problem. Glad I could help.