Re: SQL:2011 PERIODS vs Postgres Ranges?

Поиск
Список
Период
Сортировка
От Paul A Jungwirth
Тема Re: SQL:2011 PERIODS vs Postgres Ranges?
Дата
Msg-id CA+renyV9_XBWLjKSVFHxO6Y98SBuvB=a9nb3Y6UjzaUDptTJrQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SQL:2011 PERIODS vs Postgres Ranges?  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Ответы Re: SQL:2011 PERIODS vs Postgres Ranges?  (Ibrar Ahmed <ibrar.ahmad@gmail.com>)
Список pgsql-hackers
> Here is that patch. I've changed the title from "temporal_pks" to
> "temporal_fks" but it includes both.

Here are rebased patches to add temporal PKs and FKs. Note they depend
on my other commitfest entry adding a range_agg function. The PKs
patch should be applied first, then the FKs patch. These are mostly
the same as before, but I've added a small optimization to the FK
patch. The traditional FK code skips the UPDATE triggers if the PK/FK
columns didn't change. For temporal RI, we can broaden the condition:
on a PK update, if the new PK range is a superset of the old (and the
other parts of the key are equal), we can skip the check. On an FK
update, if the new FK range is a subset of the old (and the other
parts of the key are equal), we can skip the check.

These are still very WIP patches. They include a bunch of TODO
comments where I'm hoping to get feedback. Also their "taste" is
surely questionable. In many cases I took the least-obtrusive path
even where that might not be the best one. If anyone wants to offer
some corrections, I would gratefully pay attention. :-)

My plan is to work on UPDATE/DELETE FOR PORTION OF next, then use that
to add CASCADE functionality to temporal FKs. I've started reading how
executor nodes work, but I'll probably reach out with some questions.
. . . :-) Also I need to decide how triggers should behave in a
temporal update/delete. I have my own opinion about what is sensible,
but I haven't found guidance in the standard, so I'm going to see what
other RDBMSes are doing. (If someone has a reference to a part of the
standard I overlooked, let me know! :-)

Yours,
Paul

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: new polymorphic types - commontype and commontypearray
Следующее
От: Michael Paquier
Дата:
Сообщение: Race conditions with TAP test for syncrep