|
|
@ -702,12 +702,12 @@ CREATE FOREIGN TABLE ft1 ( |
|
|
|
COMMENT ON FOREIGN TABLE ft1 IS 'ft1'; |
|
|
|
COMMENT ON FOREIGN TABLE ft1 IS 'ft1'; |
|
|
|
COMMENT ON COLUMN ft1.c1 IS 'ft1.c1'; |
|
|
|
COMMENT ON COLUMN ft1.c1 IS 'ft1.c1'; |
|
|
|
\d+ ft1 |
|
|
|
\d+ ft1 |
|
|
|
Foreign table "public.ft1" |
|
|
|
Foreign table "public.ft1" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+--------------------------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+--------------------------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | ("param 1" 'val1') | plain | | ft1.c1 |
|
|
|
c1 | integer | | not null | | ("param 1" 'val1') | plain | | ft1.c1 |
|
|
|
c2 | text | | (param2 'val2', param3 'val3') | extended | | |
|
|
|
c2 | text | | | | (param2 'val2', param3 'val3') | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"ft1_c2_check" CHECK (c2 <> ''::text) |
|
|
|
"ft1_c2_check" CHECK (c2 <> ''::text) |
|
|
|
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) |
|
|
|
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) |
|
|
@ -757,19 +757,19 @@ ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 SET (n_distinct = 100); |
|
|
|
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1; |
|
|
|
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STATISTICS -1; |
|
|
|
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN; |
|
|
|
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 SET STORAGE PLAIN; |
|
|
|
\d+ ft1 |
|
|
|
\d+ ft1 |
|
|
|
Foreign table "public.ft1" |
|
|
|
Foreign table "public.ft1" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+--------------------------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+--------------------------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | ("param 1" 'val1') | plain | 10000 | |
|
|
|
c1 | integer | | not null | | ("param 1" 'val1') | plain | 10000 | |
|
|
|
c2 | text | | (param2 'val2', param3 'val3') | extended | | |
|
|
|
c2 | text | | | | (param2 'val2', param3 'val3') | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
c4 | integer | default 0 | | plain | | |
|
|
|
c4 | integer | | | 0 | | plain | | |
|
|
|
c5 | integer | | | plain | | |
|
|
|
c5 | integer | | | | | plain | | |
|
|
|
c6 | integer | not null | | plain | | |
|
|
|
c6 | integer | | not null | | | plain | | |
|
|
|
c7 | integer | | (p1 'v1', p2 'v2') | plain | | |
|
|
|
c7 | integer | | | | (p1 'v1', p2 'v2') | plain | | |
|
|
|
c8 | text | | (p2 'V2') | plain | | |
|
|
|
c8 | text | | | | (p2 'V2') | plain | | |
|
|
|
c9 | integer | | | plain | | |
|
|
|
c9 | integer | | | | | plain | | |
|
|
|
c10 | integer | | (p1 'v1') | plain | | |
|
|
|
c10 | integer | | | | (p1 'v1') | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"ft1_c2_check" CHECK (c2 <> ''::text) |
|
|
|
"ft1_c2_check" CHECK (c2 <> ''::text) |
|
|
|
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) |
|
|
|
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) |
|
|
@ -807,18 +807,18 @@ ERROR: relation "ft1" does not exist |
|
|
|
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1; |
|
|
|
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME c1 TO foreign_column_1; |
|
|
|
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1; |
|
|
|
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1; |
|
|
|
\d foreign_schema.foreign_table_1 |
|
|
|
\d foreign_schema.foreign_table_1 |
|
|
|
Foreign table "foreign_schema.foreign_table_1" |
|
|
|
Foreign table "foreign_schema.foreign_table_1" |
|
|
|
Column | Type | Modifiers | FDW Options |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options |
|
|
|
------------------+---------+-----------+-------------------------------- |
|
|
|
------------------+---------+-----------+----------+---------+-------------------------------- |
|
|
|
foreign_column_1 | integer | not null | ("param 1" 'val1') |
|
|
|
foreign_column_1 | integer | | not null | | ("param 1" 'val1') |
|
|
|
c2 | text | | (param2 'val2', param3 'val3') |
|
|
|
c2 | text | | | | (param2 'val2', param3 'val3') |
|
|
|
c3 | date | | |
|
|
|
c3 | date | | | | |
|
|
|
c4 | integer | default 0 | |
|
|
|
c4 | integer | | | 0 | |
|
|
|
c5 | integer | | |
|
|
|
c5 | integer | | | | |
|
|
|
c6 | integer | not null | |
|
|
|
c6 | integer | | not null | | |
|
|
|
c7 | integer | | (p1 'v1', p2 'v2') |
|
|
|
c7 | integer | | | | (p1 'v1', p2 'v2') |
|
|
|
c8 | text | | (p2 'V2') |
|
|
|
c8 | text | | | | (p2 'V2') |
|
|
|
c10 | integer | | (p1 'v1') |
|
|
|
c10 | integer | | | | (p1 'v1') |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"ft1_c2_check" CHECK (c2 <> ''::text) |
|
|
|
"ft1_c2_check" CHECK (c2 <> ''::text) |
|
|
|
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) |
|
|
|
"ft1_c3_check" CHECK (c3 >= '01-01-1994'::date AND c3 <= '01-31-1994'::date) |
|
|
@ -1241,33 +1241,33 @@ CREATE TABLE pt1 ( |
|
|
|
CREATE FOREIGN TABLE ft2 () INHERITS (pt1) |
|
|
|
CREATE FOREIGN TABLE ft2 () INHERITS (pt1) |
|
|
|
SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); |
|
|
|
SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | | |
|
|
|
c1 | integer | | not null | | plain | | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
Inherits: pt1 |
|
|
|
Inherits: pt1 |
|
|
|
|
|
|
|
|
|
|
|
DROP FOREIGN TABLE ft2; |
|
|
|
DROP FOREIGN TABLE ft2; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | | |
|
|
|
c1 | integer | | not null | | plain | | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
|
|
|
|
|
|
|
|
CREATE FOREIGN TABLE ft2 ( |
|
|
|
CREATE FOREIGN TABLE ft2 ( |
|
|
|
c1 integer NOT NULL, |
|
|
|
c1 integer NOT NULL, |
|
|
@ -1275,32 +1275,32 @@ CREATE FOREIGN TABLE ft2 ( |
|
|
|
c3 date |
|
|
|
c3 date |
|
|
|
) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); |
|
|
|
) SERVER s0 OPTIONS (delimiter ',', quote '"', "be quoted" 'value'); |
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
|
|
|
|
|
|
|
|
ALTER FOREIGN TABLE ft2 INHERIT pt1; |
|
|
|
ALTER FOREIGN TABLE ft2 INHERIT pt1; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | | |
|
|
|
c1 | integer | | not null | | plain | | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
Inherits: pt1 |
|
|
|
Inherits: pt1 |
|
|
@ -1316,12 +1316,12 @@ NOTICE: merging column "c1" with inherited definition |
|
|
|
NOTICE: merging column "c2" with inherited definition |
|
|
|
NOTICE: merging column "c2" with inherited definition |
|
|
|
NOTICE: merging column "c3" with inherited definition |
|
|
|
NOTICE: merging column "c3" with inherited definition |
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
Inherits: pt1 |
|
|
|
Inherits: pt1 |
|
|
@ -1329,21 +1329,21 @@ Child tables: ct3, |
|
|
|
ft3 |
|
|
|
ft3 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ct3 |
|
|
|
\d+ ct3 |
|
|
|
Table "public.ct3" |
|
|
|
Table "public.ct3" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | | |
|
|
|
c1 | integer | | not null | | plain | | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Inherits: ft2 |
|
|
|
Inherits: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft3 |
|
|
|
\d+ ft3 |
|
|
|
Foreign table "public.ft3" |
|
|
|
Foreign table "public.ft3" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
Inherits: ft2 |
|
|
|
Inherits: ft2 |
|
|
|
|
|
|
|
|
|
|
@ -1354,31 +1354,31 @@ ALTER TABLE pt1 ADD COLUMN c6 integer; |
|
|
|
ALTER TABLE pt1 ADD COLUMN c7 integer NOT NULL; |
|
|
|
ALTER TABLE pt1 ADD COLUMN c7 integer NOT NULL; |
|
|
|
ALTER TABLE pt1 ADD COLUMN c8 integer; |
|
|
|
ALTER TABLE pt1 ADD COLUMN c8 integer; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | | |
|
|
|
c1 | integer | | not null | | plain | | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
c4 | integer | | plain | | |
|
|
|
c4 | integer | | | | plain | | |
|
|
|
c5 | integer | default 0 | plain | | |
|
|
|
c5 | integer | | | 0 | plain | | |
|
|
|
c6 | integer | | plain | | |
|
|
|
c6 | integer | | | | plain | | |
|
|
|
c7 | integer | not null | plain | | |
|
|
|
c7 | integer | | not null | | plain | | |
|
|
|
c8 | integer | | plain | | |
|
|
|
c8 | integer | | | | plain | | |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
c4 | integer | | | plain | | |
|
|
|
c4 | integer | | | | | plain | | |
|
|
|
c5 | integer | default 0 | | plain | | |
|
|
|
c5 | integer | | | 0 | | plain | | |
|
|
|
c6 | integer | | | plain | | |
|
|
|
c6 | integer | | | | | plain | | |
|
|
|
c7 | integer | not null | | plain | | |
|
|
|
c7 | integer | | not null | | | plain | | |
|
|
|
c8 | integer | | | plain | | |
|
|
|
c8 | integer | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
Inherits: pt1 |
|
|
|
Inherits: pt1 |
|
|
@ -1386,31 +1386,31 @@ Child tables: ct3, |
|
|
|
ft3 |
|
|
|
ft3 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ct3 |
|
|
|
\d+ ct3 |
|
|
|
Table "public.ct3" |
|
|
|
Table "public.ct3" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | | |
|
|
|
c1 | integer | | not null | | plain | | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
c4 | integer | | plain | | |
|
|
|
c4 | integer | | | | plain | | |
|
|
|
c5 | integer | default 0 | plain | | |
|
|
|
c5 | integer | | | 0 | plain | | |
|
|
|
c6 | integer | | plain | | |
|
|
|
c6 | integer | | | | plain | | |
|
|
|
c7 | integer | not null | plain | | |
|
|
|
c7 | integer | | not null | | plain | | |
|
|
|
c8 | integer | | plain | | |
|
|
|
c8 | integer | | | | plain | | |
|
|
|
Inherits: ft2 |
|
|
|
Inherits: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft3 |
|
|
|
\d+ ft3 |
|
|
|
Foreign table "public.ft3" |
|
|
|
Foreign table "public.ft3" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
c4 | integer | | | plain | | |
|
|
|
c4 | integer | | | | | plain | | |
|
|
|
c5 | integer | default 0 | | plain | | |
|
|
|
c5 | integer | | | 0 | | plain | | |
|
|
|
c6 | integer | | | plain | | |
|
|
|
c6 | integer | | | | | plain | | |
|
|
|
c7 | integer | not null | | plain | | |
|
|
|
c7 | integer | | not null | | | plain | | |
|
|
|
c8 | integer | | | plain | | |
|
|
|
c8 | integer | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
Inherits: ft2 |
|
|
|
Inherits: ft2 |
|
|
|
|
|
|
|
|
|
|
@ -1428,31 +1428,31 @@ ALTER TABLE pt1 ALTER COLUMN c1 SET (n_distinct = 100); |
|
|
|
ALTER TABLE pt1 ALTER COLUMN c8 SET STATISTICS -1; |
|
|
|
ALTER TABLE pt1 ALTER COLUMN c8 SET STATISTICS -1; |
|
|
|
ALTER TABLE pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL; |
|
|
|
ALTER TABLE pt1 ALTER COLUMN c8 SET STORAGE EXTERNAL; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
c4 | integer | default 0 | plain | | |
|
|
|
c4 | integer | | | 0 | plain | | |
|
|
|
c5 | integer | | plain | | |
|
|
|
c5 | integer | | | | plain | | |
|
|
|
c6 | integer | not null | plain | | |
|
|
|
c6 | integer | | not null | | plain | | |
|
|
|
c7 | integer | | plain | | |
|
|
|
c7 | integer | | | | plain | | |
|
|
|
c8 | text | | external | | |
|
|
|
c8 | text | | | | external | | |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | 10000 | |
|
|
|
c1 | integer | | not null | | | plain | 10000 | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
c4 | integer | default 0 | | plain | | |
|
|
|
c4 | integer | | | 0 | | plain | | |
|
|
|
c5 | integer | | | plain | | |
|
|
|
c5 | integer | | | | | plain | | |
|
|
|
c6 | integer | not null | | plain | | |
|
|
|
c6 | integer | | not null | | | plain | | |
|
|
|
c7 | integer | | | plain | | |
|
|
|
c7 | integer | | | | | plain | | |
|
|
|
c8 | text | | | external | | |
|
|
|
c8 | text | | | | | external | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
Inherits: pt1 |
|
|
|
Inherits: pt1 |
|
|
@ -1466,21 +1466,21 @@ ALTER TABLE pt1 DROP COLUMN c6; |
|
|
|
ALTER TABLE pt1 DROP COLUMN c7; |
|
|
|
ALTER TABLE pt1 DROP COLUMN c7; |
|
|
|
ALTER TABLE pt1 DROP COLUMN c8; |
|
|
|
ALTER TABLE pt1 DROP COLUMN c8; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | 10000 | |
|
|
|
c1 | integer | | not null | | | plain | 10000 | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
FDW Options: (delimiter ',', quote '"', "be quoted" 'value') |
|
|
|
Inherits: pt1 |
|
|
|
Inherits: pt1 |
|
|
@ -1503,24 +1503,24 @@ SELECT relname, conname, contype, conislocal, coninhcount, connoinherit |
|
|
|
|
|
|
|
|
|
|
|
-- child does not inherit NO INHERIT constraints |
|
|
|
-- child does not inherit NO INHERIT constraints |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk1" CHECK (c1 > 0) NO INHERIT |
|
|
|
"pt1chk1" CHECK (c1 > 0) NO INHERIT |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | 10000 | |
|
|
|
c1 | integer | | not null | | | plain | 10000 | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
@ -1550,24 +1550,24 @@ ALTER FOREIGN TABLE ft2 ADD CONSTRAINT pt1chk2 CHECK (c2 <> ''); |
|
|
|
ALTER FOREIGN TABLE ft2 INHERIT pt1; |
|
|
|
ALTER FOREIGN TABLE ft2 INHERIT pt1; |
|
|
|
-- child does not inherit NO INHERIT constraints |
|
|
|
-- child does not inherit NO INHERIT constraints |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk1" CHECK (c1 > 0) NO INHERIT |
|
|
|
"pt1chk1" CHECK (c1 > 0) NO INHERIT |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
Server: s0 |
|
|
|
Server: s0 |
|
|
@ -1581,23 +1581,23 @@ ALTER TABLE pt1 DROP CONSTRAINT pt1chk2 CASCADE; |
|
|
|
INSERT INTO pt1 VALUES (1, 'pt1'::text, '1994-01-01'::date); |
|
|
|
INSERT INTO pt1 VALUES (1, 'pt1'::text, '1994-01-01'::date); |
|
|
|
ALTER TABLE pt1 ADD CONSTRAINT pt1chk3 CHECK (c2 <> '') NOT VALID; |
|
|
|
ALTER TABLE pt1 ADD CONSTRAINT pt1chk3 CHECK (c2 <> '') NOT VALID; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) NOT VALID |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) NOT VALID |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) NOT VALID |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) NOT VALID |
|
|
@ -1608,23 +1608,23 @@ Inherits: pt1 |
|
|
|
-- VALIDATE CONSTRAINT need do nothing on foreign tables |
|
|
|
-- VALIDATE CONSTRAINT need do nothing on foreign tables |
|
|
|
ALTER TABLE pt1 VALIDATE CONSTRAINT pt1chk3; |
|
|
|
ALTER TABLE pt1 VALIDATE CONSTRAINT pt1chk3; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
@ -1635,24 +1635,24 @@ Inherits: pt1 |
|
|
|
-- OID system column |
|
|
|
-- OID system column |
|
|
|
ALTER TABLE pt1 SET WITH OIDS; |
|
|
|
ALTER TABLE pt1 SET WITH OIDS; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
Has OIDs: yes |
|
|
|
Has OIDs: yes |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
@ -1665,23 +1665,23 @@ ALTER TABLE ft2 SET WITHOUT OIDS; -- ERROR |
|
|
|
ERROR: cannot drop inherited column "oid" |
|
|
|
ERROR: cannot drop inherited column "oid" |
|
|
|
ALTER TABLE pt1 SET WITHOUT OIDS; |
|
|
|
ALTER TABLE pt1 SET WITHOUT OIDS; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | plain | 10000 | |
|
|
|
c1 | integer | | not null | | plain | 10000 | |
|
|
|
c2 | text | | extended | | |
|
|
|
c2 | text | | | | extended | | |
|
|
|
c3 | date | | plain | | |
|
|
|
c3 | date | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
c1 | integer | not null | | plain | | |
|
|
|
c1 | integer | | not null | | | plain | | |
|
|
|
c2 | text | | | extended | | |
|
|
|
c2 | text | | | | | extended | | |
|
|
|
c3 | date | | | plain | | |
|
|
|
c3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
|
"pt1chk3" CHECK (c2 <> ''::text) |
|
|
@ -1696,23 +1696,23 @@ ALTER TABLE pt1 RENAME COLUMN c3 TO f3; |
|
|
|
-- changes name of a constraint recursively |
|
|
|
-- changes name of a constraint recursively |
|
|
|
ALTER TABLE pt1 RENAME CONSTRAINT pt1chk3 TO f2_check; |
|
|
|
ALTER TABLE pt1 RENAME CONSTRAINT pt1chk3 TO f2_check; |
|
|
|
\d+ pt1 |
|
|
|
\d+ pt1 |
|
|
|
Table "public.pt1" |
|
|
|
Table "public.pt1" |
|
|
|
Column | Type | Modifiers | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+----------+--------------+------------- |
|
|
|
f1 | integer | not null | plain | 10000 | |
|
|
|
f1 | integer | | not null | | plain | 10000 | |
|
|
|
f2 | text | | extended | | |
|
|
|
f2 | text | | | | extended | | |
|
|
|
f3 | date | | plain | | |
|
|
|
f3 | date | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"f2_check" CHECK (f2 <> ''::text) |
|
|
|
"f2_check" CHECK (f2 <> ''::text) |
|
|
|
Child tables: ft2 |
|
|
|
Child tables: ft2 |
|
|
|
|
|
|
|
|
|
|
|
\d+ ft2 |
|
|
|
\d+ ft2 |
|
|
|
Foreign table "public.ft2" |
|
|
|
Foreign table "public.ft2" |
|
|
|
Column | Type | Modifiers | FDW Options | Storage | Stats target | Description |
|
|
|
Column | Type | Collation | Nullable | Default | FDW Options | Storage | Stats target | Description |
|
|
|
--------+---------+-----------+-------------+----------+--------------+------------- |
|
|
|
--------+---------+-----------+----------+---------+-------------+----------+--------------+------------- |
|
|
|
f1 | integer | not null | | plain | | |
|
|
|
f1 | integer | | not null | | | plain | | |
|
|
|
f2 | text | | | extended | | |
|
|
|
f2 | text | | | | | extended | | |
|
|
|
f3 | date | | | plain | | |
|
|
|
f3 | date | | | | | plain | | |
|
|
|
Check constraints: |
|
|
|
Check constraints: |
|
|
|
"f2_check" CHECK (f2 <> ''::text) |
|
|
|
"f2_check" CHECK (f2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (f2 <> ''::text) |
|
|
|
"pt1chk2" CHECK (f2 <> ''::text) |
|
|
|