mirror of
https://github.com/sqlc-dev/sqlc.git
synced 2025-04-24 14:50:49 +03:00
Update postgresql_type.go: accept "timestamp" as a case (#3811)
Some checks failed
kotlin / test (push) Has been cancelled
python / test (push) Has been cancelled
typescript / test (push) Has been cancelled
go / test macos-14 cgo=0 (push) Has been cancelled
go / test ubuntu-22.04 cgo=0 (push) Has been cancelled
go / test macos-14 cgo=1 (push) Has been cancelled
go / test ubuntu-22.04 cgo=1 (push) Has been cancelled
go / vuln_check (push) Has been cancelled
Some checks failed
kotlin / test (push) Has been cancelled
python / test (push) Has been cancelled
typescript / test (push) Has been cancelled
go / test macos-14 cgo=0 (push) Has been cancelled
go / test ubuntu-22.04 cgo=0 (push) Has been cancelled
go / test macos-14 cgo=1 (push) Has been cancelled
go / test ubuntu-22.04 cgo=1 (push) Has been cancelled
go / vuln_check (push) Has been cancelled
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.
This commit is contained in:
parent
4c4408479d
commit
ec9d492c40
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue