我已创建(作为更大数据库的一部分)另一个数据结构的枚举,如下所示:
CREATE TYPE training_days AS ENUM (
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
'Sunday'
);
CREATE TABLE TrainingSlots (
Day training_days PRIMARY KEY,
Time VARCHAR(5) NOT NULL
);
每当我向此表插入数据并将其返回时:
INSERT INTO TrainingSlots VALUES
('Monday','12:00'),
('Tuesday','12:00'),
('Wednesday','14:00'),
('Thursday','12:00'),
('Friday','12:00'),
('Saturday','15:00'),
('Sunday','16:00');
SELECT * FROM TrainingSlots;
然后我得到输出:
| DAY | TIME |
|-----------------|-------|
| [object Object] | 12:00 |
| [object Object] | 12:00 |
| [object Object] | 14:00 |
| [object Object] | 12:00 |
| [object Object] | 12:00 |
| [object Object] | 15:00 |
| [object Object] | 16:00 |
为什么不返回枚举值?我是否错误地插入了数据?或者类似的东西?