c1 | integer | | not null | | plain | |
c2 | text | | | | extended | |
c3 | date | | | | plain | |
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
c1 | integer | | not null | | plain | |
c2 | text | | | | extended | |
c3 | date | | | | plain | |
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
- ft3
+ ft3, FOREIGN
\d+ ct3
Table "public.ct3"
c6 | integer | | | | plain | |
c7 | integer | | not null | | plain | |
c8 | integer | | | | plain | |
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
- ft3
+ ft3, FOREIGN
\d+ ct3
Table "public.ct3"
c6 | integer | | not null | | plain | |
c7 | integer | | | | plain | |
c8 | text | | | | external | |
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
- ft3
+ ft3, FOREIGN
-- drop attributes recursively
ALTER TABLE fd_pt1 DROP COLUMN c4;
c1 | integer | | not null | | plain | 10000 |
c2 | text | | | | extended | |
c3 | date | | | | plain | |
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
- ft3
+ ft3, FOREIGN
-- add constraints recursively
ALTER TABLE fd_pt1 ADD CONSTRAINT fd_pt1chk1 CHECK (c1 > 0) NO INHERIT;
Check constraints:
"fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
"fd_pt1chk2" CHECK (c2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
FDW options: (delimiter ',', quote '"', "be quoted" 'value')
Inherits: fd_pt1
Child tables: ct3,
- ft3
+ ft3, FOREIGN
DROP FOREIGN TABLE ft2; -- ERROR
ERROR: cannot drop foreign table ft2 because other objects depend on it
Check constraints:
"fd_pt1chk1" CHECK (c1 > 0) NO INHERIT
"fd_pt1chk2" CHECK (c2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
c3 | date | | | | plain | |
Check constraints:
"fd_pt1chk3" CHECK (c2 <> ''::text) NOT VALID
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
c3 | date | | | | plain | |
Check constraints:
"fd_pt1chk3" CHECK (c2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
f3 | date | | | | plain | |
Check constraints:
"f2_check" CHECK (f2 <> ''::text)
-Child tables: ft2
+Child tables: ft2, FOREIGN
\d+ ft2
Foreign table "public.ft2"
c2 | text | | | | extended | |
c3 | date | | | | plain | |
Partition key: LIST (c1)
-Partitions: fd_pt2_1 FOR VALUES IN (1)
+Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"
c2 | text | | | | extended | |
c3 | date | | | | plain | |
Partition key: LIST (c1)
-Partitions: fd_pt2_1 FOR VALUES IN (1)
+Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"
c2 | text | | | | extended | |
c3 | date | | | | plain | |
Partition key: LIST (c1)
-Partitions: fd_pt2_1 FOR VALUES IN (1)
+Partitions: fd_pt2_1 FOR VALUES IN (1), FOREIGN
\d+ fd_pt2_1
Foreign table "public.fd_pt2_1"