Skip to content

Commit

Permalink
Update postgresql_type.go: accept "timestamp" as a case (#3811)
Browse files Browse the repository at this point in the history
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 Feb 10, 2025
1 parent 4c44084 commit ec9d492
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit ec9d492

Please sign in to comment.