当前位置:网站首页>mysql 索引和 pgsql 索引 命名区别
mysql 索引和 pgsql 索引 命名区别
2022-08-08 16:24:00 【一个搬砖的农民工】
- mysql 索引名称在相同表不能相同,在不同表可以相同。
- pgsql索引无论在相同表还是不同表都不能相同。因为:
索引、表、视图和序列共享相同的名称空间,因此如果它们位于同一架构(=名称空间)中,则其中任何两个对象都不能具有相同的名称。
从包含所有这些对象的目录表pg_class的表定义中可以看到:
\d pg_class
Table "pg_catalog.pg_class"
Column │ Type │ Collation │ Nullable │ Default
═════════════════════╪══════════════╪═══════════╪══════════╪═════════
oid │ oid │ │ not null │
relname │ name │ │ not null │
[...]
Indexes:
"pg_class_oid_index" UNIQUE, btree (oid)
"pg_class_relname_nsp_index" UNIQUE, btree (relname, relnamespace)
"pg_class_tblspc_relfilenode_index" btree (reltablespace, relfilenode)
第二个索引pg_class_relname_nsp_index强制名称和模式的组合是唯一的。
边栏推荐
- 使用FastApi服务解决程序反复调试导致速度过慢的问题(以tsfresh为例)
- Take you to play with the "Super Cup" ECS features and experiment on the pit [HUAWEI CLOUD is simple and far]
- 有了这个开源工具后,我五点就下班了!
- 急了,Mysql索引中最不容易记的三个知识点通透了
- 常见的网络安全术语之一
- 赶紧进来修内功!!!带你认识C语言中各种进制数和原码反码补码.
- 使用 Pygame 构建和可视化数独游戏
- sql合并连续时间段内,某字段相同的行。
- ImportError: numpy.core.multiarray failed to import [cv2, matplotlib, PyTorch, pyinstaller ]
- 函数节流与函数防抖
猜你喜欢
随机推荐
京东T9纯手打688页神笔记,SSM框架整合Redis搭建高效互联网应用
UTF-8 BOM文件导致配置文件无法读取
10 Top Open Source Caching Tools for Linux in 2020
bzoj2816 [ZJOI2012] Network
Jingdong T9 pure hand type 688 pages of god notes, SSM framework integrates Redis to build efficient Internet applications
R语言(数值、列表、矩阵)上应用函数(sqrt、round、mean、log)、将矩阵所有数据求对数、就矩阵整体的均值、使用apply函数计算矩阵matrix的行均值、列均值、trim设置返回结果精度
ESP8266-Arduino编程实例-ADS1015(ADC)驱动
论文解读(soft-mask GNN)《Soft-mask: Adaptive Substructure Extractions for Graph Neural Networks》
谈谈怎么可以得到显著性图 特征图 featuremap
ERROR Failed to compile with 1 error
Guanghong Technology: The company provides manufacturing services for Xiaomi, Samsung, OPPO, Nokia and other products in India
在通达信开户安全不呢
groovy基础学习
VIT:Transformer进军CV的里程碑
Taro小程序跨端开发入门实战
Building and Visualizing Sudoku Games with Pygame
hdu2475 Box
在 Fedora 上使用 SSH 端口转发
广东大学生网络安全攻防大赛CTF部分WP
国泰君安证券新手开户、有安全保障吗?