我想在下表中插入,但我无法转换日期数组。
CREATE TABLE schedule (
idschedule serial NOT NULL,
idzone integer NOT NULL,
"time" timestamp without time zone NOT NULL,
automatic boolean NOT NULL,
idrecurrence character varying(20),
duration integer,
date date,
)
我INSERT
正在尝试执行:
INSERT INTO schedule(idzone, "date", "time", duration, automatic)
SELECT x, y, '20:00:00', '20', 'FALSE'
FROM unnest(ARRAY[3,4,5]) x
, unnest(ARRAY[2015-4-12, 2015-4-19, 2015-4-26]) y
我收到以下错误:
错误:列“日期”是日期类型但表达式是整数类型