mirror of
https://github.com/ent/ent.git
synced 2026-05-03 16:10:59 +03:00
dialect/sql/schema: add support for tstzrange and interval and in postgres (#2013)
Fixes #1989
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user