|
55 | 55 | "inet", "line", "uuid", "interval", "mediumint",
|
56 | 56 | "json", "jsonb", "box", "cidr", "circle",
|
57 | 57 | "lseg", "macaddr", "path", "pg_lsn", "point",
|
58 |
| - "polygon", "txid_snapshot", "money", "hstore", |
| 58 | + "polygon", "txid_snapshot", "money", "time", "hstore", |
59 | 59 | }
|
60 | 60 | )
|
61 | 61 |
|
@@ -244,6 +244,11 @@ func randomizeField(s *Seed, field reflect.Value, fieldType string, canBeNull bo
|
244 | 244 | field.Set(reflect.ValueOf(value))
|
245 | 245 | return nil
|
246 | 246 | }
|
| 247 | + if fieldType == "time" { |
| 248 | + value = null.NewString(randTime(), true) |
| 249 | + field.Set(reflect.ValueOf(value)) |
| 250 | + return nil |
| 251 | + } |
247 | 252 | case typeNullInt32:
|
248 | 253 | if fieldType == "mediumint" {
|
249 | 254 | // 8388607 is the max for 3 byte int
|
@@ -320,6 +325,11 @@ func randomizeField(s *Seed, field reflect.Value, fieldType string, canBeNull bo
|
320 | 325 | field.Set(reflect.ValueOf(value))
|
321 | 326 | return nil
|
322 | 327 | }
|
| 328 | + if fieldType == "time" { |
| 329 | + value = randTime() |
| 330 | + field.Set(reflect.ValueOf(value)) |
| 331 | + return nil |
| 332 | + } |
323 | 333 | case reflect.Int32:
|
324 | 334 | if fieldType == "mediumint" {
|
325 | 335 | // 8388607 is the max for 3 byte int
|
|
0 commit comments