pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add temporal PRIMARY KEY and UNIQUE constraints
Date: Wed, 24 Jan 2024 15:43:09 +0000
Message-ID: <E1rSfPB-002tu6-5W@gemulon.postgresql.org> (raw )
Add temporal PRIMARY KEY and UNIQUE constraints
Add WITHOUT OVERLAPS clause to PRIMARY KEY and UNIQUE constraints.
These are backed by GiST indexes instead of B-tree indexes, since they
are essentially exclusion constraints with = for the scalar parts of
the key and && for the temporal part.
Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail....
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/46a0cd4cefb4d9b462d8cc4df5e7ecdd190bea92
Modified Files
--------------
contrib/btree_gist/Makefile | 2 +-
contrib/btree_gist/expected/without_overlaps.out | 44 +++
contrib/btree_gist/meson.build | 1 +
contrib/btree_gist/sql/without_overlaps.sql | 25 ++
doc/src/sgml/catalogs.sgml | 10 +
doc/src/sgml/gist.sgml | 14 +-
doc/src/sgml/ref/create_table.sgml | 45 ++-
src/backend/access/gist/gistutil.c | 29 ++
src/backend/catalog/heap.c | 2 +
src/backend/catalog/index.c | 4 +
src/backend/catalog/pg_constraint.c | 2 +
src/backend/commands/indexcmds.c | 143 +++++++-
src/backend/commands/tablecmds.c | 6 +-
src/backend/commands/trigger.c | 1 +
src/backend/commands/typecmds.c | 1 +
src/backend/nodes/outfuncs.c | 2 +
src/backend/nodes/readfuncs.c | 2 +
src/backend/parser/gram.y | 29 +-
src/backend/parser/parse_utilcmd.c | 28 +-
src/backend/utils/adt/ruleutils.c | 2 +
src/backend/utils/cache/relcache.c | 18 +-
src/bin/pg_dump/pg_dump.c | 16 +-
src/bin/pg_dump/pg_dump.h | 2 +
src/bin/pg_dump/t/002_pg_dump.pl | 36 +++
src/bin/psql/describe.c | 12 +-
src/include/access/gist.h | 3 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/index.h | 1 +
src/include/catalog/pg_constraint.h | 10 +-
src/include/commands/defrem.h | 6 +-
src/include/nodes/parsenodes.h | 2 +
src/test/regress/expected/without_overlaps.out | 395 +++++++++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/sql/without_overlaps.sql | 290 +++++++++++++++++
34 files changed, 1135 insertions(+), 52 deletions(-)
view thread (2+ messages) latest in thread
Message-ID: <E1rSfPB-002tu6-5W@gemulon.postgresql.org>
Permalink: ../E1rSfPB-002tu6-5W@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1rSfPB-002tu6-5W@gemulon.postgresql.org
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add temporal PRIMARY KEY and UNIQUE constraints
In-Reply-To: <E1rSfPB-002tu6-5W@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox