Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update postgresql_type.go: accept "timestamp" as a case
the only type accepted as a case for postgres type `timestamp` is `pg_catalog.timestamp`. It would be better if `timestamp` was also accepted directly, just as `timestamptz` is.
  • Loading branch information
theAnuragMishra authored Jan 29, 2025
commit 1755d4928117debda41d0d766d0c1f2ba44776a5
2 changes: 1 addition & 1 deletion internal/codegen/golang/postgresql_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
}
return "sql.NullTime"

case "pg_catalog.timestamp":
case "pg_catalog.timestamp", "timestamp":
if driver == opts.SQLDriverPGXV5 {
return "pgtype.Timestamp"
}
Expand Down