当前位置: 首页 > news >正文

做电影网站只放链接算侵权吗安徽建设工程信息管理平台

做电影网站只放链接算侵权吗,安徽建设工程信息管理平台,dede网站运行天数,wordpress插件位置【MySQL\Oracle\PostgreSQL】迁移到openGauss数据出现的问题解决方案 问题1:序列值不自动刷新问题 下面SQL只针对单库操作以及每个序列只绑定一张表的情况 -- 自动生成的序列,设置序列值 with sequences as (select *from (select table_schema,table_…

【MySQL\Oracle\PostgreSQL】迁移到openGauss数据出现的问题解决方案

问题1:序列值不自动刷新问题
下面SQL只针对单库操作以及每个序列只绑定一张表的情况

-- 自动生成的序列,设置序列值
with sequences as (select *from (select table_schema,table_name,column_name,pg_get_serial_sequence(format('%I.%I', table_schema,table_name), column_name) as auto_seq, --<<自动(string_to_array(column_default, E'\''))[2]             as col_seq   --<<手动from information_schema.columnswhere table_schema not in ('pg_catalog', 'information_schema')and column_default ILIKE 'nextval(%'and table_schema = 'usc') t
--                    where auto_seq is not null),maxvals as (select table_schema,table_name,column_name,auto_seq,col_seq,(xpath('/row/max/text()',query_to_xml(format('select max(%I) as max from %I.%I', column_name, table_schema,table_name),true, true, '')))[1]::text::bigint as max_val,(xpath('/row/cur/text()',query_to_xml(format('select last_value as cur from %I.%I',table_schema, col_seq),true, true, '')))[1]::text::bigint as cur_valfrom sequences)
select table_schema,table_name,column_name,auto_seq,col_seq,cur_val,coalesce(max_val, 0) as max_val,setval(col_seq, coalesce(max_val, 1)) --<<设置序列值
from maxvals;

问题2:
字符类型为空字符串迁移后会变成null排查,需要考虑大表问题,防止慢SQL

-- 数据库迁移出现null/空字符串 排除
with t as (select table_schema,table_name,column_name,(xpath('/row/cnt/text()',query_to_xml(format(E'select count(*) as cnt from %I.%I where %I = \'\'', table_schema,table_name, column_name),true, true, '')))[1]::text::bigint as null_cnt
from information_schema.columns
where table_schema not in ('pg_catalog', 'information_schema')and table_schema = 'usc'and is_nullable = 'NO'and udt_name in ('varchar', 'text', 'bpchar'))
select * from t where null_cnt > 0;

问题3:
时间精度问题,导致时间范围查询失败。批量调整时间字段精度

DO
$$DECLAREr RECORD;BEGINFOR r INselect table_name, column_name, udt_namefrom information_schema.columnswhere table_schema not in ('pg_catalog', 'information_schema')and table_schema = 'usc'and udt_name in ('timestamp','timestamptz')LOOPEXECUTE 'ALTER TABLE ' || r.table_name || ' ALTER COLUMN ' || r.column_name || ' TYPE ' || r.udt_name ||'(0)';END LOOP;END
$$;
http://www.dtcms.com/a/562734.html

相关文章:

  • 【正点原子 D20 WiFi 模块】介绍、配置、工程测试
  • Linux 下 tar 命令详解:归档与压缩完整指南
  • 戚墅堰做网站wordpress调用 自定义php代码
  • 巩义市住房和城乡规划建设局网站建站网站加盟
  • 有关网站建设的视频梅林固件 搭建wordpress
  • 网络层计算题
  • 网站建设要后台吗个人网站建设图片素材
  • 企业网站群建设怎么推广比较好
  • 网站建设收费标准方案wordpress 页面模板不显示不出来
  • WSL实践二
  • 网站建设交流推广上海人才招聘网官网
  • 自主建网站百度百度一下就知道
  • 室内设计案例去什么网站中文wordpress 主题
  • 贺州市住房与城乡建设局网站wordpress内容页不显示
  • php开发大型网站开发建筑培训app
  • bind和lambda中的拷贝赋值
  • 广州网站建设=388元做网站流量
  • 郴州网站维护交互式网站备案难吗
  • linux中多路复用IO:select、poll和epoll
  • 企业网站怎样做优化哈尔滨网站设计人
  • 游戏的网站网站的注册和登录怎么做
  • php网站开发技术做wordpress模板赚钱
  • (免费分享)springboot+vue心理健康评测系统
  • 公司网站不备案长春网络推广长春seo公司
  • phpstudy搭建本地网站保密管理咨询公司
  • 济南网站建设用途北京网络营销公司网页
  • 【深度神经网络】优化深度神经网络
  • 我不想找之前做网站的续费青岛济南网页设计公司
  • 石狮网站定制南昌网站建设兼职
  • 网站开发属于什么模式树莓派做的网站