小编wil*_*lty的帖子

从时间改变列与时区到时间戳

我无法将end_datekey_request时区中调用的表中调用的列更改为timestampPostgres数据库.我尝试使用以下代码:

alter table key_request alter column end_date type timestamp with time zone using end_date::timestamp with time zone
Run Code Online (Sandbox Code Playgroud)

我一直收到以下错误:

ERROR:  cannot cast type time with time zone to timestamp with time zone
Run Code Online (Sandbox Code Playgroud)

知道如何调整此查询才能工作吗?

sql postgresql timestamp alter postgresql-9.2

4
推荐指数
2
解决办法
1万
查看次数

标签 统计

alter ×1

postgresql ×1

postgresql-9.2 ×1

sql ×1

timestamp ×1