neondatabase / neondatabase/serverless
Dates from generate_series returned as string / different handling than pg does
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 548
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I'm not very familiar with how PostgreSQL drivers work and need some advice or confirmation. I've isolated an error that seems to be caused by a Kysely query returning a date as a string in one environment (connect to the DB with @vercel/postgres-kysely which uses this package) and as a date object (connect with pg) in another. Am I right that kysely has nothing to do with data types and just gives me what the driver does? I did not check how timestamp columns are returned, this issue occurs in context of dates generated by generate_series function. Is it desired behaviour to return strings while pg returns date objects? Does this indicate a missing feature or a bug? Maybe someone can look into this. Thank you!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the generate_series query through @vercel/postgres-kysely and through pg, then inspect the driver result-type handling rather than Kysely's query builder. Compare date and timestamp behavior and determine whether the string/object difference is expected or indicates a bug; done means a confirmed explanation or a clearly scoped follow-up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100