Apropos of the question of how much rearrangement functionality the
SQL spec actually asks for, I was interested to come across this entry
in SQL:2021's Table 43 — Feature taxonomy and definition for mandatory
features:
Feature ID Feature Name Feature Description
F311-01 CREATE SCHEMA — Subclause 11.1, “<schema definition>”:
Support for circular references in that <refer-
ential constraint definition>s in two different
<table definition>s may reference columns in
the other table
We already claim support for F311-01 in sql_features.txt, but based
on this entry I'd have to say that's a lie. However, (a) the current
patchset fixes that, and (b) this seems like good evidence in support
of the idea that circular foreign keys are the only aspect of the
business that anyone cares about.
regards, tom lane