【openGauss︱PostgreSQL】openGauss或PostgreSQL查表、索引、序列、权限、函数

【openGauss︱PostgreSQL】openGauss或PostgreSQL查表、索引、序列、权限、函数

  • 一、openGauss查表
  • 二、openGauss查索引
  • 三、openGauss查序列
  • 四、openGauss查权限
  • 五、openGauss或PostgreSQL查函数
  • 六、PostgreSQL查表
  • 七、PostgreSQL查索引
  • 八、PostgreSQL查序列
  • 九、PostgreSQL查权限


一、openGauss查表

/* openGauss查表 */
select (casewhen substr(version(), 0, 1) = '('then substring(substr(version(), 2, length(version())) from '^[^ ]+')else substring(version() from '^[^ ]+')end)::text as database_type,ic.table_schema::text as schema,o.owner::text,ic.table_name::text,tab_com.description::text as table_comment,ic.ordinal_position::text as column_num,ic.column_name::text,(casewhen ic.data_type = 'bigint'then 'INT8'when ic.data_type = 'integer'then 'INT4'when ic.data_type = 'smallint'then 'INT2'when ic.data_type in ('nvarchar2') AND ic.character_maximum_length IS NOT NULLthen upper(ic.data_type) || '(' || ic.character_maximum_length || ')'when ic.data_type in ('nvarchar2') AND ic.character_maximum_length IS NULLthen 'NVARCHAR2'when ic.data_type in ('character varying')then 'VARCHAR(' || ic.character_maximum_length || ')'when ic.data_type in ('character')then 'CHAR(' || ic.character_maximum_length || ')'when ic.data_type = 'timestamp without time zone'then 'TIMESTAMP(' || ic.datetime_precision || ')'when ic.data_type = 'time without time zone'then 'TIME(' || ic.datetime_precision || ')'when ic.data_type = 'numeric' and ic.numeric_precision is not null and ic.numeric_scale is not nullthen 'NUMERIC(' || ic.numeric_precision || ',' || ic.numeric_scale || ')'when ic.data_type = 'numeric' and ic.numeric_precision is null and ic.numeric_scale is nullthen 'NUMERIC'when ic.data_type = 'text'then 'TEXT'when ic.data_type = 'date'then 'DATE'else upper(ic.data_type)end)::text as data_type,col_com.description::text as column_comment,(CASEwhen (POSITION(lower('::regclass') IN lower(ic.column_default)) > 0)then REPLACE(ic.column_default, '::regclass', '')when (POSITION(lower('::integer') IN lower(ic.column_default)) > 0)then REPLACE(REPLACE(ic.column_default, '::integer', ''), '''', '')else ic.column_defaultend)::text as column_default,ic.is_nullable::text,(casewhen pc.conname is null then null::textelse 'Y'end)::text as pkeyfrom pg_class c-- join db_objects o join adm_objects o on o.object_id = c.oid and o.object_type like '%table%'and c.relkind in ('r','p')-- and c.relname ~ '[0-9]'join pg_namespace non c.relnamespace = n.oidjoin information_schema.columns icon ic.table_name = c.relnameand n.nspname = ic.table_schemaleft join pg_description tab_comon tab_com.objoid = c.oidand tab_com.objsubid = 0left join pg_description col_comon col_com.objoid = c.oidand col_com.objsubid = ic.ordinal_positionleft join (SELECT conname, conrelid , unnest(conkey) as column_numFROM pg_constraintwhere contype = 'p') as pcon pc.conrelid = c.oidand pc.column_num = ic.ordinal_positionwhere 1=1order by ic.table_schema, ic.table_name, ic.ordinal_position
;

二、openGauss查索引

/* openGauss查索引 */
with t as (select (case when t1.indexdef ~ '^.* WHERE .*$'then REGEXP_REPLACE(t1.indexdef, '^.*\((.*)\).* WHERE .*$', '\1')else REGEXP_REPLACE(t1.indexdef, '^.*\((.*)\).*$', '\1')end)::varchar as index_columns,t1.* from (select 'gs_et_sit'::varchar as source,o.owner::varchar,ist.table_schema::varchar as schemaname,c.relname::varchar as tablename,c1.relname::varchar as indexname,(case i.indisuniquewhen 't' then 'Y'when 'f' then 'N'end)::varchar as index_is_unique,(case i.indisprimarywhen 't' then 'Y'when 'f' then 'N'end)::varchar as index_is_primary,(pg_get_indexdef(i.indexrelid))::varchar as indexdef_old,(case when pg_get_indexdef(i.indexrelid) ~ '^.*WHERE.*$'then replace(replace(replace(REGEXP_REPLACE(pg_get_indexdef(i.indexrelid),'^.*WHERE \((.*)\).*.*$', '\1'),'::text', ''),'(', ''),')', '')else NULLend)::varchar as where_condition,(casewhen i.indisprimary = 't'then 'ALTER TABLE ' || c.relname || ' ADD CONSTRAINT ' || c1.relname || ' PRIMARY KEY (' || (case when pg_get_indexdef(i.indexrelid) ~ '^.*\((.*)\).*\((.*)\).*$'then REGEXP_REPLACE(pg_get_indexdef(i.indexrelid), '^.*\((.*)\).*\((.*)\).*$', '\1')else REGEXP_REPLACE(pg_get_indexdef(i.indexrelid), '^.*\((.*)\).*$', '\1')end) || ');' else replace(replace(replace(replace(replace(replace(pg_get_indexdef(i.indexrelid),' USING btree', ''),' TABLESPACE pg_default', ''),'::text', ''),' WITH (storage_type=USTORE)', ''),'WITH (storage_type=ustore)', ''),' USING ubtree', '')||';'end)::varchar as indexdef           from pg_index i,pg_class c1,pg_class c,information_schema.tables ist,db_objects o,pg_namespace nwhere i.indexrelid = c1.oidand i.indrelid = c.oidand c.relnamespace = n.oidand c.relname = ist.table_nameand n.nspname = ist.table_schemaand o.object_id = c.oidand ist.table_schema not in ('pg_catalog','db4ai')and ist.table_schema not like '%\_test%'and o.owner not in ('rdsAdmin','hisAdmin')and o.owner not like '%test%'and c.relname !~* '^pg\_toast\_.*$') t1)
select t.source,t.owner,t.schemaname as schema,t.tablename,t.indexname,t.indexdef,t.index_is_primary,t.index_is_unique,t.index_columns,t.where_conditionfrom torder by t.schemaname, t.tablename, t.indexname
;

三、openGauss查序列

/* openGauss查序列 */
with c as (
select r.rolname::varchar as owner,n.nspname::varchar as schema,c.relname::varchar as sequence_namefrom pg_class c, pg_roles r, pg_namespace nwhere c.relowner = r.oidand c.relnamespace = n.oidand c.relkind = 'S')
,s as (
select sequence_owner::varchar as owner,sequence_name::varchar,min_value::varchar,max_value::varchar,increment_by::varchar,cache_size::varchar,cycle_flag::varchar,last_number::varcharfrom db_sequences
)
select c.owner::varchar,c.schema::varchar,c.sequence_name::varchar,s.min_value::varchar,s.max_value::varchar,s.increment_by::varchar,s.cache_size::varchar,s.cycle_flag::varchar,s.last_number::varcharfrom Cinner join s on c.owner = s.owner and c.sequence_name = s.sequence_nameorder by schema, sequence_name;

四、openGauss查权限

/* openGauss查权限 */
WITH pg_rel_privs AS(SELECT xx.schemaname,xx.owner,xx.relname,xx.relkind,xx.relacls[1] AS grantee,xx.relacls[2] AS privilege,xx.relacls[3] AS grantorFROM (SELECT (SELECT n.nspnameFROM pg_namespace nWHERE n.oid = tt.relnamespace) AS schemaname,o.owner,tt.relname,tt.relkind,regexp_split_to_array(unnest(tt.relacl)::character varying::text, '=|/'::text) AS relaclsFROM pg_class ttLEFT JOIN db_objects oON tt.oid = o.object_idWHERE tt.relacl IS NOT NULL) xx)
SELECT t.schemaname::varchar as schema,t.owner::varchar,t.relname::varchar as object_name,(CASEWHEN t.relkind = 'r' ::char THEN 'table' ::textWHEN t.relkind = 'S' ::char THEN 'sequence' ::textWHEN t.relkind = 'v' ::char THEN 'view' ::textWHEN t.relkind = 'p' ::char THEN 'patition table' ::textELSE t.relkind ::textEND)::varchar AS type,t.grantor::varchar,t.grantee::varchar,(TRIM(CASE WHEN instr(t.privilege, 'a') > 0 THEN 'insert,' END || CASE WHEN instr(t.privilege, 'r') > 0 THEN 'select,' END || CASE WHEN instr(t.privilege, 'w') > 0 THEN 'update,' END || CASE WHEN instr(t.privilege, 'd') > 0 THEN 'delete,' END || CASE WHEN instr(t.privilege, 'D') > 0 THEN 'truncate,' END || CASE WHEN instr(t.privilege, 'U') > 0 THEN 'usage,' END,','))::varchar AS privilegeFROM pg_rel_privs tWHERE t.grantor != 'rdsAdmin'AND t.grantee != t.grantororder by schema,object_name,type,grantor,grantee,privilege;

五、openGauss或PostgreSQL查函数

/* openGauss或PostgreSQL查函数 */
select (CASE schemawhen 'tzq' then 'f_g_tzq'else schemaEND)::varchar as schema,(CASE ownerwhen 'tzq' then 'f_g_tzq'else ownerEND)::varchar as owner,pro_name,pro_arg,pro_arg_type,pro_ret_type,pro_content  from (
select * from (select pn.nspname::varchar AS schema,r.rolname::varchar as owner,pc.proname::varchar as pro_name,pc.proargnames::varchar as pro_arg,(SELECT array(SELECT format_type(val, NULL)FROM unnest(proargtypes) as val))::varchar as pro_arg_type,format_type(pc.prorettype, NULL)::varchar as pro_ret_type,REGEXP_REPLACE(pg_get_functiondef(pc."oid")::text, '^\(4,"(.*)"\)$', '\1')::textas pro_contentfrom pg_proc pcinner join pg_roles ron pc.proowner = r.oidinner join pg_namespace pnon pc.pronamespace = pn.oidwhere 1=1and pn.nspname not in ('pg_catalog','dbe_pldebugger')and r.rolname not in ('rdsAdmin') and pc.proargnames is not nullorder by r.rolname asc
) aa
union all select pn.nspname::varchar AS schema,r.rolname::varchar as owner,pc.proname::varchar as pro_name,pc.proargnames::varchar as pro_arg,proargtypes::varchar AS pro_arg_type,format_type(pc.prorettype, NULL)::varchar as pro_ret_type-- ,pc.oid,REGEXP_REPLACE(pg_get_functiondef(pc.oid)::text, '^\(4,"(.*)"\)$', '\1')::text as pro_contentfrom pg_proc pcinner join pg_roles ron pc.proowner = r.oidinner join pg_namespace pnon pc.pronamespace = pn.oidwhere 1=1and pn.nspname not in ('pg_catalog','dbe_pldebugger')and r.rolname not in ('rdsAdmin') and pc.proargnames is null
) bb
order by schema, pro_name;

六、PostgreSQL查表

/* PostgreSQL查表 */
/* 更新日志:由于 information_schema.columns 有权限控制,不是该用户能查的权限就查不到,故下掉。采用 pg_attrdef 来获取列的默认值
*/
with tab_info_v as (SELECT substring(version() FROM '(\S+)') as database_type,n.nspname AS schema,r.rolname as owner,c.relname AS table_name,(col_description(c.oid, 0))::character varying AS table_comment,a.attnum,a.attname AS column_name,concat_ws('', t.typname) AS data_type,(CASEWHEN a.attlen > 0 THEN a.attlenWHEN t.typname = 'bit' THEN a.atttypmodELSE a.atttypmod - 4END) AS data_length,CASE-- 为了和 高斯比对WHEN (((format_type(a.atttypid, a.atttypmod))::character varying)::text = 'date'::text) THEN 'TIMESTAMP(0)'::character varyingWHEN (((format_type(a.atttypid, a.atttypmod))::character varying)::text = 'bigint'::text) THEN 'INT8'::character varyingWHEN (((format_type(a.atttypid, a.atttypmod))::character varying)::text = 'smallint'::text) THEN 'INT2'::character varyingWHEN (((format_type(a.atttypid, a.atttypmod))::character varying)::text = 'integer'::text) THEN 'INT4'::character varyingWHEN (left(((format_type(a.atttypid, a.atttypmod))::character varying)::text, 17) = 'character varying'::text) THEN (replace(((format_type(a.atttypid, a.atttypmod))::character varying)::text, 'character varying'::text, 'VARCHAR'::text))::character varyingWHEN (left(((format_type(a.atttypid, a.atttypmod))::character varying)::text, 9) = 'character'::text) THEN (replace(((format_type(a.atttypid, a.atttypmod))::character varying)::text, 'character'::text, 'char'::text))::character varyingWHEN (((format_type(a.atttypid, a.atttypmod))::text)::text = 'timestamp without time zone'::text) THEN 'TIMESTAMP'::character varyingWHEN (((format_type(a.atttypid, a.atttypmod))::text)::text = 'timestamp(0) without time zone'::text) THEN 'TIMESTAMP(0)'::character varyingWHEN (((format_type(a.atttypid, a.atttypmod))::text)::text = 'timestamp(6) without time zone'::text) THEN 'TIMESTAMP(6)'::character varyingELSE (format_type(a.atttypid, a.atttypmod))::character varyingEND AS typelen,(CASEWHEN a.attnotnull = TRUE THEN 'NO'ELSE 'YES'END) AS is_nullable  --  可为空,(CASEWHEN (SELECT COUNT(pg_constraint.*)FROM pg_constraintINNER JOIN pg_classON pg_constraint.conrelid = pg_class.oidINNER JOIN pg_attributeON pg_attribute.attrelid = pg_class.oidAND pg_attribute.attnum = ANY(pg_constraint.conkey)INNER JOIN pg_typeON pg_type.oid = pg_attribute.atttypidWHERE pg_class.relname = c.relnameAND pg_constraint.contype = 'p'AND pg_attribute.attname = a.attnameand pg_class.relowner = c.relowner) > 0 THEN 'Y'ELSE NULLEND) AS pkey,pg_get_expr(ad.adbin, ad.adrelid) as data_default,(SELECT descriptionFROM pg_descriptionWHERE objoid = a.attrelidAND objsubid = a.attnum) AS column_commentFROM pg_class cinner join pg_roles ron c.relowner = r.oidand c.relkind in ('r','p')and c.relpartbound is null-- and ((relkind = 'p') or (relkind = 'r' and relpartbound is null))inner join pg_attribute aon a.attnum > 0AND a.attrelid = c.oidinner join pg_namespace non n.oid = c.relnamespaceinner join pg_type ton a.atttypid = t.oidleft join pg_attrdef ad  --  列的默认值on ad.adrelid = c.oidand ad.adnum = a.attnumWHERE 1 = 1and n.nspname not in ('information_schema')ORDER BY c.relname ASC,a.attnum ASC,a.attname ASC
)
select database_type-- ,schema,CASE schemawhen 'tzq' then 'f_g_tzq'else schemaEND as schema,CASE ownerwhen 'tzq' then 'f_g_tzq'else schemaEND as owner,table_name, table_comment,attnum,column_name,replace(upper(typelen),'VARCHAR','NVARCHAR2') as data_type,column_comment,data_default as column_default,is_nullable,pkeyfrom tab_info_v vwhere 1=1-- and table_name = 'ets_risk_premium_check_tmp'-- and schema <> ownerand table_name not like 'adms_ogg_checkpoint%'-- and table_name !~ '[p][0-9]{2}$'-- and table_name !~ '[p][0-9]{1}$'-- and table_name ~ '[p][0-9]{1}$'
order by schema, table_name, attnum, column_name;

七、PostgreSQL查索引

/* PostgreSQL查索引 */
-- drop view if exists pg_index_info_v;
-- create view pg_index_info_v as 
with t as (
select u.usename ,c.relname as tablename,c1.relname as indexname,case i.indisuniquewhen 't' then 'Y'when 'f' then 'N'end as index_is_unique  -- 是否为唯一索引,case i.indisprimarywhen 't' then 'Y'when 'f' then 'N'end as index_is_primary  -- 是否为主键,case when pg_get_indexdef(i.indexrelid) ~ '^.* WHERE .*$'then REGEXP_REPLACE(pg_get_indexdef(i.indexrelid), '^.*\((.*)\).* WHERE .*$', '\1')else REGEXP_REPLACE(pg_get_indexdef(i.indexrelid), '^.*\((.*)\).*$', '\1')end as index_columns,replace(pg_get_indexdef(i.indexrelid), 'USING btree ', '')||';'as indexdef1,casewhen i.indisprimary = 't'then 'ALTER TABLE ' || c.relname || ' ADD CONSTRAINT ' || c1.relname || ' PRIMARY KEY (' || (case when pg_get_indexdef(i.indexrelid) ~ '^.*\((.*)\).*\((.*)\).*$'then REGEXP_REPLACE(pg_get_indexdef(i.indexrelid), '^.*\((.*)\).*\((.*)\).*$', '\1')else REGEXP_REPLACE(pg_get_indexdef(i.indexrelid), '^.*\((.*)\).*$', '\1')end) || ');' else replace(replace(replace(pg_get_indexdef(i.indexrelid),' USING btree', ''),' TABLESPACE pg_default', '') ,'::text', '') ||';'end as indexdef,case when pg_get_indexdef(i.indexrelid) ~ '^.*WHERE.*$'then replace(replace(replace(REGEXP_REPLACE(pg_get_indexdef(i.indexrelid),'^.*WHERE \((.*)\).*.*$', '\1'),'::text', ''),'(', ''),')', '')else NULLend as where_condition--,i.* from pg_index i,pg_class c1,pg_class c,pg_user uwhere i.indexrelid = c1.oidand i.indrelid = c.oidand c.relowner = u.usesysidand c.relkind in ('r','p')and c.relpartbound is null-- and u.usename = CURRENT_USERand c.relname !~* '^pg\_toast\_.*$')
select CASE t.usenamewhen 'tzq' then 'f_g_tzq'else t.usenameEND as schema,t.tablename,t.indexname,casewhen index_is_primary = 'Y'then 'ALTER TABLE ' || t.tablename || ' ADD CONSTRAINT ' || t.indexname || ' PRIMARY KEY (' || t.index_columns || ');' else t.indexdef end as indexdef,t.index_is_unique,t.index_is_primary,t.index_columns,t.where_conditionfrom twhere t.tablename not like 'adms_ogg_checkpoint%'order by t.usename, t.tablename, t.indexname;

八、PostgreSQL查序列

/* PostgreSQL查序列 */
select (CASE sequenceownerwhen 'tzq' then 'f_g_tzq'else sequenceownerEND)::varchar as owner,(CASE schemanamewhen 'tzq' then 'f_g_tzq'else schemanameEND)::varchar as schema, sequencename::varchar as sequence_name, min_value::varchar, max_value::varchar, increment_by::varchar, cache_size::varchar,(case cycle when 'f' then 'n' else 'y' end)::varchar as cycle_flag,(case when last_value is null then '1' else last_value end)::varchar as last_numberfrom pg_sequenceswhere 1=1-- and schemaname in ('tzq');order by schema,sequence_name;

九、PostgreSQL查权限

/* PostgreSQL查权限 */
WITH pg_rel_privs AS (SELECT xx.relowner,xx.schemaname,xx.relname,xx.relkind,xx.relacls[1] AS grantee,xx.relacls[2] AS privilege,xx.relacls[3] AS grantorFROM ( SELECT ( SELECT u.usenameFROM pg_user uWHERE u.usesysid = tt.relowner) AS relowner,( SELECT n.nspnameFROM pg_namespace nWHERE n.oid = tt.relnamespace) AS schemaname,tt.relname,tt.relkind,regexp_split_to_array(unnest(tt.relacl)::character varying::text, '=|/'::text) AS relaclsFROM pg_class ttWHERE tt.relacl IS NOT NULL) xx),
dba_tab_privs as (SELECT x.relowner AS owner_,x.schemaname AS schema_name,x.relname AS table_name,CASEWHEN x.relkind = 'r'::char THEN 'table'::textWHEN x.relkind = 'S'::char THEN 'sequence'::textWHEN x.relkind = 'v'::char THEN 'view'::textWHEN x.relkind = 'p'::char THEN 'patition table'::textELSE x.relkind::textEND AS type_,x.grantee,CASEWHEN x.privilege = 'r'::text THEN 'select'::textWHEN x.privilege = 'a'::text THEN 'insert'::textWHEN x.privilege = 'd'::text THEN 'delete'::textWHEN x.privilege = 'w'::text THEN 'update'::textWHEN x.privilege = 'D'::text THEN 'truncate'::textWHEN x.privilege = 'X'::text THEN 'execute'::textWHEN x.privilege = 'U'::text THEN 'usage'::textWHEN x.privilege = 'x'::text THEN 'references'::textWHEN x.privilege = 't'::text THEN 'trigger'::textELSE x.privilegeEND AS privilege,x.grantorFROM ( SELECT t.relowner,t.schemaname,t.relname,t.relkind,t.grantee,regexp_split_to_table(t.privilege, ''::text) AS privilege,t.grantorFROM pg_rel_privs tWHERE t.relowner <> t.grantee) x)
select (CASE schema_namewhen 'tzq' then 'f_g_tzq'else schema_nameEND)::varchar as schema,(CASE owner_when 'tzq' then 'f_g_tzq'else owner_END)::varchar as owner,table_name::varchar as object_name,type_::varchar as type,(CASE lower(grantor)when 'tzq' then 'f_g_tzq'else lower(grantor)END)::varchar as grantor,(CASE lower(grantee)when 'tzq' then 'f_g_tzq'else lower(grantee)END)::varchar as grantee,privilege::varcharfrom dba_tab_privs twhere owner_ not in ('rdsAdmin')and schema_name not in ('pg_catalog')and lower(grantee) not in ('appmon')-- and schema_name in ('tzq')-- and (table_name like '%\_t' OR table_name like '%\_ti' OR table_name like '%\_tmp')
-- and type_ ~* 'table'and table_name not like 'adms_ogg_checkpoint%'
order by schema_name,table_name;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/888668.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

QT的ui界面显示不全问题(适应高分辨率屏幕)

//自动适应高分辨率 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);一、问题 电脑分辨率高&#xff0c;默认情况下&#xff0c;打开QT的ui界面&#xff0c;显示不全按钮内容 二、解决方案 如果自己的电脑分辨率较高&#xff0c;可以尝试以下方案&#xff1a;自…

超级详细,如何手动安装python第三方库?

文章目录 1&#xff0c;python第三方库安装包有3种类型2&#xff0c;python第三方库安装包whl文件如何安装&#xff1f;3&#xff0c;python第三方库安装包zip和tar.gz文件如何安装&#xff1f;4&#xff0c; python第三方库安装包exe文件如何安装&#xff1f; 手动安装第三方库…

Alibaba EasyExcel 导入导出全家桶

一、阿里巴巴EasyExcel的优势 首先说下EasyExcel相对 Apache poi的优势&#xff1a; EasyExcel也是阿里研发在poi基础上做了封装&#xff0c;改进产物。它替开发者做了注解列表解析&#xff0c;表格填充等一系列代码编写工作&#xff0c;并将此抽象成通用和可扩展的框架。相对p…

什么叫自动获得ip地址?自动获得的ip地址怎么设置

在数字化时代&#xff0c;网络连接已成为我们日常生活和工作中不可或缺的一部分。然而&#xff0c;对于非技术用户而言&#xff0c;复杂的网络配置常常令人感到困惑。幸运的是&#xff0c;自动获得IP地址技术的出现&#xff0c;极大地简化了网络配置过程。本文将详细介绍自动获…

mac: docker : Command not found解决

描述: 安装docker但是docker命令显示Command not found 分析: mac没有配置对应的环境变量 解决方案: 打开配置文件: vim ~/.zshrc写docker环境变量: export PATH"/Applications/Docker.app/Contents/Resources/bin:$PATH"保存退出: esc,输入wq,按enter 配置文…

Redis高阶之容错切换

当一台主机master宕掉之后&#xff0c;他的从机会取代主机么&#xff1f; 查看集群状态 127.0.0.1:6385> cluster nodes c8ff33e8da5fd8ef821c65974dda304d2e3327f9 192.168.58.129:638216382 slave f6b1fd5e58df90782f602b484c2011d52fc3482d 0 1733220836918 1 connecte…

数据库原理-期末复习基础知识第二弹

1、数据的逻辑独立性是指 外模式/模式映像 当模式改变的时候&#xff0c;由数据库管理员对各个外模式/模式的映像做出相应改变&#xff0c;使外模式保持不变。由于应用程序是按照外模式进行编写的&#xff0c;故应用程序不必修改&#xff0c;保证了数据与程序的逻辑独立性。 …

流媒体之linux下离线部署FFmpeg 和 SRS

前言 用户对网络做了限制&#xff0c;只能访问指定的网址&#xff0c;和没网没啥区别&#xff0c;导致无法连接外网&#xff0c;无法获取安装包&#xff0c;还有一些编译需要的开源工具 用户需要用平台查看库房的海康摄像头实时监控&#xff0c;只能在库房里一台纯净的ubantu…

数字时代的文化宝库:存储技术与精神生活

文章目录 1. 文学经典的数字传承2. 音乐的无限可能3. 影视艺术的数字化存储4. 结语 数字时代的文化宝库&#xff1a;存储技术与精神生活 在数字化的浪潮中&#xff0c;存储技术如同一座桥梁&#xff0c;连接着过去与未来&#xff0c;承载着人类文明的瑰宝。随着存储容量的不断增…

2024年12月大语言模型最新对比:GPT-4、Claude 3、文心一言等详细评测

前言 随着人工智能技术的快速发展&#xff0c;大语言模型(LLM)已经成为了技术领域最热门的话题。本文将详细对比目前主流的大语言模型&#xff0c;帮助大家选择最适合的工具。 一、OpenAI GPT系列 1. GPT-4 核心优势&#xff1a; 多模态理解能力强 逻辑推理能力出色 创造…

TCP/IP 和 UDP

一、TCP/IP&#xff08;传输控制协议&#xff09; TCP/IP 是一个协议族&#xff0c;它是互联网的基础协议&#xff0c;为网络通信提供了标准化的方法。TCP/IP 分为四个层次&#xff0c;每一层都有特定的功能&#xff1a; 应用层&#xff1a;这是最接近用户的层&#xff0c;包含…

React第十一节 组件之间通讯之发布订阅模式(自定义发布订阅器)

组件之间通讯常用方案 1、通过props 2、通过context 3、通过发布订阅模式 4、通过Redux 后面会有专栏介绍 什么情况下使用发布订阅模式 a、当我们想要兄弟组件之间通讯&#xff0c;而共同的父组件中又用不到这些数据时候&#xff1b; b、当多个毫无相关的组件之间想要进行数据…

渗透测试之Web基础之Linux病毒编写——泷羽sec

声明&#xff1a; 学习视频来自B站UP主泷羽sec,如涉及侵权马上删除文章。本文只涉及学习内容,其他的都与本人无关,切莫逾越法律红线,否则后果自负 泷羽sec的个人空间-泷羽sec个人主页-哔哩哔哩视频 (bilibili.com)https://space.bilibili.com/350329294 导读&#xff1a; 时刻…

macos上设置windsurf命令行启动

解决方案 1. 在/usr/local/bin 目录下创建软链 sudo ln -s /Applications/Windsurf.app/Contents/Resources/app/bin/windsurf /usr/local/bin/windsurf 2. 执行source source ~/.zshrc

基于神经网络的弹弹堂类游戏弹道快速预测

目录 一、 目的... 1 1.1 输入与输出.... 1 1.2 隐网络架构设计.... 1 1.3 激活函数与损失函数.... 1 二、 训练... 2 2.1 数据加载与预处理.... 2 2.2 训练过程.... 2 2.3 训练参数与设置.... 2 三、 测试与分析... 2 3.1 性能对比.... 2 3.2 训练过程差异.... 3 四、…

Xlsxwriter生成Excel文件时TypeError异常处理

在使用 XlsxWriter 生成 Excel 文件时&#xff0c;如果遇到 TypeError&#xff0c;通常是因为尝试写入的值或格式与 XlsxWriter 的限制或要求不兼容。 1、问题背景 在使用 Xlsxwriter 库生成 Excel 文件时&#xff0c;出现 TypeError: “expected string or buffer” 异常。此…

MATLAB期末复习笔记(下)

目录 五、数据和函数的可视化 1.MATLAB的可视化对象 2.二维图形的绘制 3.图形标识 4.多子图绘图 5.直方图的绘制 &#xff08;1&#xff09;分类 &#xff08;2&#xff09;垂直累计式 &#xff08;3&#xff09;垂直分组式 &#xff08;4&#xff09;水平分组式 &…

操作系统学习

问题&#xff1a; 因为想用傲梅来给系统盘扩容&#xff0c;导致无法进入操作系统&#xff0c;报错如下&#xff1a; 无法加载应用程序或操作系统&#xff0c;原因是所需文件丢失或包含错误. 文件:Windowslsystem32lwinload.efi错误代码: 0xc000007b 你需要使用恢复工具。如果…

【环境搭建】Python、PyTorch与cuda的版本对应表

一个愿意伫立在巨人肩膀上的农民...... 在深度学习的世界里&#xff0c;选择合适的工具版本是项目成功的关键。CUDA、PyTorch和Python作为深度学习的三大支柱&#xff0c;它们的版本匹配问题不容忽视。错误的版本组合可能导致兼容性问题、性能下降甚至项目失败。因此&#xff0…

No.26 笔记 | 信息收集与工具实践指南

渗透测试的第一步&#xff1a;信息收集背后的“侦察艺术” 在网络安全的世界里&#xff0c;信息就是武器。 无论是追踪隐藏的漏洞&#xff0c;还是找到不被注意的入口&#xff0c;信息收集就像一场现代化的“谍战片”。而作为渗透测试的开场白&#xff0c;信息收集不仅考验技…