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
benjaco
changed the title
Nullable datetimes are used for timestaps marked as not null in PGX / GO
Nullable datetimes are used for timestamps marked as not null in PGX / GO
Feb 12, 2025
Version
1.28.0
What happened?
For pgx,
pgtype.Timestamp
is used forTIMESTAMP
(and other time related types) regardless if the column is nullable or not.time.Time
was expected to be used for timestamps marked withNOT NULL
"database/sql" is handling it correctly https://play.sqlc.dev/p/e1e23e0d41d3d1340a4a009099bb81b589385b49187b89fd40c9aee4c33097cf
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/7ac654a59b8d17aa0f7e9bd8dfd689bec9d035bc8e8ea7a5a1beb078be531769
What operating system are you using?
No response
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: