diff options
author | Bruce Momjian <bruce@momjian.us> | 2024-05-09 16:34:09 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2024-05-09 16:34:09 -0400 |
commit | c3db1f30cbaff4b96325615557de1f3528d5fd4a (patch) | |
tree | 856eef94154efcc4e873143f270c58317dce135a /doc/src | |
parent | d727c543176c32205372991d3e036e5349fb719d (diff) | |
download | postgresql-c3db1f30cbaff4b96325615557de1f3528d5fd4a.tar.gz postgresql-c3db1f30cbaff4b96325615557de1f3528d5fd4a.zip |
doc: clarify PERIOD and WITHOUT OVERLAPS in CREATE TABLE
Discussion: https://postgr.es/m/04938501-fc8f-46f3-97a4-9a81a3f24530@illuminatedcomputing.com
Author: Paul Jungwirth
Backpatch-through: master
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/create_table.sgml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 02f31d2d6fd..75f06bc49cc 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1184,11 +1184,13 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM referent for its entire duration. This column must be a range or multirange type. In addition, the referenced table must have a primary key or unique constraint declared with <literal>WITHOUT - OVERLAPS</literal>. Finally, if one side of the foreign key uses - <literal>PERIOD</literal>, the other side must too. If the <replaceable - class="parameter">refcolumn</replaceable> list is omitted, the - <literal>WITHOUT OVERLAPS</literal> part of the primary key is treated - as if marked with <literal>PERIOD</literal>. + OVERLAPS</literal>. Finally, if the foreign key has a PERIOD + <replaceable class="parameter">column_name</replaceable> specification + the corresponding <replaceable class="parameter">refcolumn</replaceable>, + if present, must also be marked <literal>PERIOD</literal>. If the + <replaceable class="parameter">refcolumn</replaceable> clause is omitted, + and thus the reftable's primary key constraint chosen, the primary key + must have its final column marked <literal>WITHOUT OVERLAPS</literal>. </para> <para> |