From 1755d4928117debda41d0d766d0c1f2ba44776a5 Mon Sep 17 00:00:00 2001 From: Anurag Mishra <86455065+theAnuragMishra@users.noreply.github.com> Date: Wed, 29 Jan 2025 23:35:39 +0530 Subject: [PATCH] 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. --- internal/codegen/golang/postgresql_type.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/codegen/golang/postgresql_type.go b/internal/codegen/golang/postgresql_type.go index 563cc09ab9..4518e1aba6 100644 --- a/internal/codegen/golang/postgresql_type.go +++ b/internal/codegen/golang/postgresql_type.go @@ -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" }