Re: SQL:2011 application time
Paul A Jungwirth <pj@illuminatedcomputing.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Rename gist stratnum support function
- 32edf732e8dc 18.0 landed
-
Remove support for temporal RESTRICT foreign keys
- b83e8a2ca2eb 18.0 landed
-
Cache NO ACTION foreign keys separately from RESTRICT foreign keys
- 9926f854d077 18.0 landed
-
Fix NO ACTION temporal foreign keys when the referenced endpoints change
- 1772d554b089 18.0 landed
-
Improve whitespace in without_overlaps test
- 888d4523f0c2 18.0 landed
-
Tests for logical replication with temporal keys
- 939b0908c87a 18.0 landed
-
Support for GiST in get_equal_strategy_number()
- 74edabce7a33 18.0 landed
-
Make the conditions in IsIndexUsableForReplicaIdentityFull() more explicit
- 13544e790ef8 18.0 landed
-
Replace get_equal_strategy_number_for_am() by get_equal_strategy_number()
- a2a475b011cf 18.0 landed
-
Improve internal logical replication error for missing equality strategy
- 321c287351f7 18.0 landed
-
Simplify IsIndexUsableForReplicaIdentityFull()
- 7727049e8f66 18.0 landed
-
Fix ALTER TABLE / REPLICA IDENTITY for temporal tables
- 79b575d3bc09 18.0 landed
-
doc: Update pg_constraint.conexclop docs for WITHOUT OVERLAPS
- f683ba0867da 18.0 landed
-
doc: Add PERIOD to ALTER TABLE reference docs
- d56af4c882e2 18.0 landed
-
doc: Add WITHOUT OVERLAPS to ALTER TABLE reference docs
- bf621059500b 18.0 landed
-
Add temporal FOREIGN KEY contraints
- 89f908a6d0ac 18.0 landed
- 34768ee36165 17.0 landed
-
Add temporal PRIMARY KEY and UNIQUE constraints
- fc0438b4e805 18.0 landed
- 46a0cd4cefb4 17.0 landed
-
Add stratnum GiST support function
- 7406ab623fee 18.0 landed
- 6db4598fcb82 17.0 landed
-
Avoid crashing when a JIT-inlined backend function throws an error.
- 5d6c64d29097 17.0 cited
-
Revert temporal primary keys and foreign keys
- 8aee330af55d 17.0 landed
-
Fix ON CONFLICT DO NOTHING/UPDATE for temporal indexes
- 144c2ce0cc75 17.0 landed
-
Add test for REPLICA IDENTITY with a temporal key
- 482e108cd38d 17.0 landed
-
Use half-open interval notation in without_overlaps tests
- 5577a71fb0cc 17.0 landed
-
Use daterange and YMD in without_overlaps tests instead of tsrange.
- a88c800deb6f 17.0 landed
-
Rename pg_constraint.conwithoutoverlaps to conperiod
- 030e10ff1a36 17.0 landed
-
Fix comment on gist_stratnum_btree
- 86232a49a437 17.0 landed
-
Add missing TAP test name
- 1ab763fc22ad 16.0 cited
-
Improve error handling of HMAC computations
- 5513dc6a304d 15.0 cited
-
Rename functions to avoid future conflicts
- ee419607381d 15.0 landed
On 5/13/24 03:11, Peter Eisentraut wrote:
> It looks like we missed some of these fundamental design questions early on, and it might be too
> late now to fix them for PG17.
>
> For example, the discussion on unique constraints misses that the question of null values in unique
> constraints itself is controversial and that there is now a way to change the behavior. So I
> imagine there is also a selection of possible behaviors you might want for empty ranges.
> Intuitively, I don't think empty ranges are sensible for temporal unique constraints. But anyway,
> it's a bit late now to be discussing this.
>
> I'm also concerned that if ranges have this fundamental incompatibility with periods, then the plan
> to eventually evolve this patch set to support standard periods will also have as-yet-unknown problems.
>
> Some of these issues might be design flaws in the underlying mechanisms, like range types and
> exclusion constraints. Like, if you're supposed to use this for scheduling but you can use empty
> ranges to bypass exclusion constraints, how is one supposed to use this? Yes, a check constraint
> using isempty() might be the right answer. But I don't see this documented anywhere.
>
> On the technical side, adding an implicit check constraint as part of a primary key constraint is
> quite a difficult implementation task, as I think you are discovering. I'm just reminded about how
> the patch for catalogued not-null constraints struggled with linking these not-null constraints to
> primary keys correctly. This sounds a bit similar.
>
> I'm afraid that these issues cannot be resolved in good time for this release, so we should revert
> this patch set for now.
I think reverting is a good idea. I'm not really happy with the CHECK constraint solution either.
I'd be happy to have some more time to rework this for v18.
A couple alternatives I'd like to explore:
1. Domain constraints instead of a CHECK constraint. I think this is probably worse, and I don't
plan to spend much time on it, but I thought I'd mention it in case someone else thought otherwise.
2. A slightly different overlaps operator, say &&&, where 'empty' &&& 'empty' is true. But 'empty'
with anything else could still be false (or not). That operator would prevent duplicates in an
exclusion constraint. This also means we could support more types than just ranges & multiranges. I
need to think about whether this combines badly with existing operators, but if not it has a lot of
promise. If anything it might be *less* contradictory, because it fits better with 'empty' @>
'empty', which we say is true.
Another thing a revert would give me some time to consider: even though it's not standard syntax, I
wonder if we want to require syntax something like `PRIMARY KEY USING gist (id, valid_at WITHOUT
OVERLAPS)`. Everywhere else we default to btree, so defaulting to gist feels a little weird. In
theory we could even someday support WITHOUT OVERLAPS with btree, if we taught that AM to answer
that question. (I admit there is probably not a lot of desire for that though.)
Yours,
--
Paul ~{:-)
pj@illuminatedcomputing.com