Skip to content

Commit ec9d492

Browse files
Update postgresql_type.go: accept "timestamp" as a case (#3811)
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.
1 parent 4c44084 commit ec9d492

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/codegen/golang/postgresql_type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
233233
}
234234
return "sql.NullTime"
235235

236-
case "pg_catalog.timestamp":
236+
case "pg_catalog.timestamp", "timestamp":
237237
if driver == opts.SQLDriverPGXV5 {
238238
return "pgtype.Timestamp"
239239
}

0 commit comments

Comments
 (0)