#36627: Support PostgreSQL 18+ temporal constraints
----------------------------------+--------------------------------------
     Reporter:  Adam Johnson      |                    Owner:  (none)
         Type:  New feature       |                   Status:  closed
    Component:  contrib.postgres  |                  Version:  dev
     Severity:  Normal            |               Resolution:  wontfix
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Changes (by David Sanders):

 * cc: David Sanders (added)

Comment:

 I haven't seen the new-features thread for this? so adding my 2ยข here for
 now...

 I'd love to see temporal features be added to Django, I've been toying
 with this myself as well.

 It should be noted that MariaDB's temporal features are more feature
 complete and differ slightly as they tend more towards the SQL standard.
 If we do support temporal features, then I'd strongly urge folks to, at
 least, be sure to include Maria in design considerations, (otherwise
 centre design around this owing to the closeness of the standard?)

 https://mariadb.com/docs/server/reference/sql-structure/temporal-tables

 Note the key difference is the formation of "periods" from date/timestamp
 columns from which the "without overlaps" keys are formed.

 {{{
 CREATE OR REPLACE TABLE rooms (
  room_number INT,
  guest_name VARCHAR(255),
  checkin DATE,
  checkout DATE,
  PERIOD FOR p(checkin,checkout),
  UNIQUE (room_number, p WITHOUT OVERLAPS)
  );
 }}}

 Adam if you want to create the new-feature I'll gladly upvote it
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36627#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701999d14b706-51cbd548-2b90-4b79-937e-04c9198ed221-000000%40eu-central-1.amazonses.com.

Reply via email to