dialect/sql/schema: add support for tstzrange and interval and in postgres (#2013)

Fixes #1989
This commit is contained in:
Shen Yang
2021-10-07 02:46:34 +08:00
committed by GitHub
parent 68793d3f99
commit 65cf307b10

View File

@@ -287,7 +287,7 @@ func (d *Postgres) scanColumn(c *Column, rows *sql.Rows) error {
// database ignores any size or multi-dimensions constraints.
c.SchemaType = map[string]string{dialect.Postgres: "ARRAY"}
c.typ = udt.String
case "USER-DEFINED":
case "USER-DEFINED", "tstzrange", "interval":
c.Type = field.TypeOther
if !udt.Valid {
return fmt.Errorf("missing user defined type for column %q", c.Name)