@@ -213,15 +213,16 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
213213 return "sql.NullTime"
214214
215215 case "pg_catalog.time" :
216- if driver == opts .SQLDriverPGXV5 {
217- return "pgtype.Time"
218- }
219216 if notNull {
220217 return "time.Time"
221218 }
222219 if emitPointersForNull {
223220 return "*time.Time"
224221 }
222+ if driver == opts .SQLDriverPGXV5 {
223+ return "pgtype.Time"
224+ }
225+
225226 return "sql.NullTime"
226227
227228 case "pg_catalog.timetz" :
@@ -234,27 +235,29 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
234235 return "sql.NullTime"
235236
236237 case "pg_catalog.timestamp" , "timestamp" :
237- if driver == opts .SQLDriverPGXV5 {
238- return "pgtype.Timestamp"
239- }
240238 if notNull {
241239 return "time.Time"
242240 }
243241 if emitPointersForNull {
244242 return "*time.Time"
245243 }
244+ if driver == opts .SQLDriverPGXV5 {
245+ return "pgtype.Timestamp"
246+ }
247+
246248 return "sql.NullTime"
247249
248250 case "pg_catalog.timestamptz" , "timestamptz" :
249- if driver == opts .SQLDriverPGXV5 {
250- return "pgtype.Timestamptz"
251- }
252251 if notNull {
253252 return "time.Time"
254253 }
255254 if emitPointersForNull {
256255 return "*time.Time"
257256 }
257+ if driver == opts .SQLDriverPGXV5 {
258+ return "pgtype.Timestamptz"
259+ }
260+
258261 return "sql.NullTime"
259262
260263 case "text" , "pg_catalog.varchar" , "pg_catalog.bpchar" , "string" , "citext" , "name" :
@@ -270,15 +273,16 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
270273 return "sql.NullString"
271274
272275 case "uuid" :
273- if driver == opts .SQLDriverPGXV5 {
274- return "pgtype.UUID"
275- }
276+
276277 if notNull {
277278 return "uuid.UUID"
278279 }
279280 if emitPointersForNull {
280281 return "*uuid.UUID"
281282 }
283+ if driver == opts .SQLDriverPGXV5 {
284+ return "pgtype.UUID"
285+ }
282286 return "uuid.NullUUID"
283287
284288 case "inet" :
0 commit comments