POSTGRES 关键字 infinity 无法识别 #1195

Open
opened 2019-01-17 12:45:52 +00:00 by tossp · 0 comments
tossp commented 2019-01-17 12:45:52 +00:00 (Migrated from github.com)

报错内容 byte2Time error:unsupported time format -infinity

实体定义

type File struct {
	ExpiryAt    time.Time `xorm:"notnull TIMESTAMPZ" description:"截止时间"`
	LastCheckAt time.Time `xorm:"notnull TIMESTAMPZ default('-infinity')" description:"最近检查"`
	CreatedAt   time.Time `xorm:"notnull TIMESTAMPZ created" description:"创建时间"`
}

我的数据表如下
image

关于infinity 的定义 http://www.postgres.cn/docs/9.4/datatype-numeric.html

报错内容` byte2Time error:unsupported time format -infinity` 实体定义 ```golang type File struct { ExpiryAt time.Time `xorm:"notnull TIMESTAMPZ" description:"截止时间"` LastCheckAt time.Time `xorm:"notnull TIMESTAMPZ default('-infinity')" description:"最近检查"` CreatedAt time.Time `xorm:"notnull TIMESTAMPZ created" description:"创建时间"` } ``` 我的数据表如下 ![image](https://user-images.githubusercontent.com/2138631/51315185-888a0100-1a8c-11e9-9167-3732a06bd078.png) 关于infinity 的定义 http://www.postgres.cn/docs/9.4/datatype-numeric.html
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1195
No description provided.