You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
Local - On my local, I am using Pool's from the pg package, and the dates get converted to JS Date objects.
Prod - In production, I am using neon's Pool's and those return as strings.
From vercel/storage#635, I found that there is an object where you set how the driver parses and serializes the data but those don't appear to work for neon.
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!
The text was updated successfully, but these errors were encountered: