疯狂的狮子li
2022-08-24 d1ef8f5eb3af6ae488d362152c1d78675281c489
fix 修复 postgresql 时间查询类型转换报错问题
已修改2个文件
13 ■■■■■ 文件已修改
script/sql/postgres/postgres_ry_vue_4.X.sql 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
script/sql/update/postgres/update-4.2-4.3.sql 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
script/sql/postgres/postgres_ry_vue_4.X.sql
@@ -957,3 +957,9 @@
insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',         '','N', 'ap-beijing',  '1', '', 'admin', now(), 'admin', now(), null);
insert into sys_oss_config values (5, 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',                 '','N', '',            '1', '', 'admin', now(), 'admin', now(), NULL);
-- 字符串自动转时间 避免框架时间查询报错问题
create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$
select to_timestamp($1, 'yyyy-mm-dd hh24:mi:ss');
$$ language sql strict ;
create cast (varchar as timestamptz) with function cast_varchar_to_timestamp as IMPLICIT;
script/sql/update/postgres/update-4.2-4.3.sql
@@ -7,3 +7,10 @@
insert into sys_menu values('1050', '账户解锁', '501', '4', '#', '', '', '1', '0', 'F', '0', '0', 'monitor:logininfor:unlock',  '#', 'admin', now(), '', null, '');
insert into sys_role_menu values ('2', '1050');
-- 字符串自动转时间 避免框架时间查询报错问题
create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$
select to_timestamp($1, 'yyyy-mm-dd hh24:mi:ss');
$$ language sql strict ;
create cast (varchar as timestamptz) with function cast_varchar_to_timestamp as IMPLICIT;