我正在使用informix数据库来存储数据。一切都正确存储。但我需要更改 Timecol 的数据类型格式。现在 TimeCol 格式为yyyy-mm-dd hh:mm:ss:0000
。存储数据时, Timecol 就是这样。我想从 Timecol 更改0000
。是否可以在informix数据库中更改 Timecol 的数据类型格式?
答案 0 :(得分:0)
似乎你不能改变它,而是用扩展来调整它。
例如
SELECT
pt.schemaname || '.' || pt.relname AS TABLE,
case
when ((pt.n_tup_del + pt.n_tup_upd) > pgs_threshold.setting::int + (pgs_scale.setting::float * pc.reltuples)) = 't' then 'YES'
when ((pt.n_tup_del + pt.n_tup_upd) > pgs_threshold.setting::int + (pgs_scale.setting::float * pc.reltuples)) = 'f' then 'NO'
end
AS VACUUM
FROM pg_class pc JOIN pg_stat_all_tables pt ON pc.relname = pt.relname
CROSS JOIN pg_settings pgs_threshold
CROSS JOIN pg_settings pgs_scale
WHERE pt.schemaname in ('schema','public')
AND pgs_threshold.name = 'autovacuum_vacuum_threshold'
AND pgs_scale.name = 'autovacuum_vacuum_scale_factor'
order by 2;