11/10/2023 0 Comments Postgres unique indexSo PostgreSQL 11 is looking like we’ll be able to add referential integrity to partitioned tables. Taken together, these features are now looking pretty good after lots of work and review. Allow Unique Index on Partitioned Tables.So that gives us a set of features and an order in which they should be implemented: ![]() The best bit is that they don’t actually exist, its just metadata! That requires some explanations and a longer post. I’ll write about partitioned indexes separately, because they are very cool. Primary Keys are implemented using Unique Indexes, so we need to add indexes and allow them to be unique. The documentation for unique constraint specifies that a unique index is created under the hood upon creation of a unique constraint. In situations when the index is corrupted or disabled and duplicated. FKs also require Primary Keys (PKs), so we must add those also. A UNIQUE index works on top of one or more columns whose combination is unique in a table. ![]() To achieve that, we need to understand the structure of features in PostgreSQL.įoreign Keys (FKs) are implemented using row Triggers, so we must allow Triggers to be executed on Partitioned Tables. In PostgreSQL, the UNIQUE index to ensure the uniqueness of values in one or more columns. The overall idea is to allow Partitioned tables to have Referential Integrity, by way of Primary Keys and Foreign Keys, as well as some additional tweaks. It’s worth explaining what these are rather than trying to piece together what is happening from reading commit messages. My colleague Alvaro Herrera has been working on a series of connected features for PostgreSQL 11. PostgreSQL 9 Cookbook – Chinese Edition.PostgreSQL Server Programming Cookbook – 2nd Edition. ![]() PostgreSQL 9 Administration Cookbook – 3rd Edition.PostgreSQL High Availability Cookbook – 2nd Edition.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |