当前位置:网站首页>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强制名称和模式的组合是唯一的。
边栏推荐
- Lecture 207, Class Schedule
- bzoj1097 [POI2007]旅游景点atr
- 手把手教你uniapp接入聊天IM即时通讯功能-源码分享
- hdu2475 Box
- leetcode 31. 下一个排列(实现next_permutation 函数)
- 2020年适用于Linux的10个顶级开源缓存工具
- VIT:Transformer进军CV的里程碑
- 2022年中国全民健身发展白皮书
- C#/VB.NET convert PDF to PDF/X-1a:2001
- Teach you how to use uniapp to access chat and IM instant messaging - source code sharing
猜你喜欢
3dsmax2021软件安装教程
leetcode 31. 下一个排列(实现next_permutation 函数)
我分析30w条数据后发现,西安新房公摊最低的竟是这里?
Dry goods: design high concurrency architecture from scratch
The origin and creation of Smobiler's complex controls
Groovy XML JSON
[Unity entry plan] Use the double blood bar method to control the blood loss speed of the damage area
Share these new Blender plugins that designers must not miss in 2022
Flutter的实现原理初探
NFT质押挖矿分红系统开发逻辑功能介绍
随机推荐
VIT:Transformer进军CV的里程碑
常见的网络安全术语之一
json根据条件存入数据库
leetcode 155. Min Stack最小栈(中等)
分享这些2022设计师们决不能错过的Blender新插件
bzoj2816 [ZJOI2012] Network
The realization of the salary slip issuing function of WeChat public account + web background
redis切片集群的理解
bzoj3693 round table hall theorem + segment tree
C语言学习概览(五)
【uniapp小程序】视图容器cover-view
带你玩转“超大杯”ECS特性及实验踩坑【华为云至简致远】
浅学软件逆向笔记(2)
Thoroughly understand the volatile keyword and application scenarios, and it is a must for interviews, and Xiaobai can understand it!
ERROR Failed to compile with 1 error
干货:从零设计高并发架构
Dry goods: design high concurrency architecture from scratch
First online!Messaging middleware fairy notes, covering the essence of Alibaba's ten years of technology
10.cuBLAS开发指南中文版--cuBLAS中的logger配置
最新30系显卡搭建paddle飞浆环境|含CUDA下载安装