rename_desc_headers.patch
text/plain
Filename: rename_desc_headers.patch
Type: text/plain
Part: 1
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 0f54964..ba36a92 100644
*** a/src/bin/psql/describe.c
--- b/src/bin/psql/describe.c
*************** describeOneTableDetails(const char *sche
*** 1398,1404 ****
headers[cols++] = gettext_noop("Definition");
if (tableinfo.relkind == 'f' && pset.sversion >= 90200)
! headers[cols++] = gettext_noop("Options");
if (verbose)
{
--- 1398,1404 ----
headers[cols++] = gettext_noop("Definition");
if (tableinfo.relkind == 'f' && pset.sversion >= 90200)
! headers[cols++] = gettext_noop("FDW Options");
if (verbose)
{
*************** describeOneTableDetails(const char *sche
*** 2092,2098 ****
ftoptions = PQgetvalue(result, 0, 1);
if (ftoptions && ftoptions[0] != '\0')
{
! printfPQExpBuffer(&buf, "Options: %s", ftoptions);
printTableAddFooter(&cont, buf.data);
}
PQclear(result);
--- 2092,2098 ----
ftoptions = PQgetvalue(result, 0, 1);
if (ftoptions && ftoptions[0] != '\0')
{
! printfPQExpBuffer(&buf, "FDW Options: %s", ftoptions);
printTableAddFooter(&cont, buf.data);
}
PQclear(result);
*************** listForeignDataWrappers(const char *patt
*** 3710,3716 ****
printACLColumn(&buf, "fdwacl");
appendPQExpBuffer(&buf,
",\n fdwoptions AS \"%s\"",
! gettext_noop("Options"));
if (pset.sversion >= 90100)
appendPQExpBuffer(&buf,
--- 3710,3716 ----
printACLColumn(&buf, "fdwacl");
appendPQExpBuffer(&buf,
",\n fdwoptions AS \"%s\"",
! gettext_noop("FDW Options"));
if (pset.sversion >= 90100)
appendPQExpBuffer(&buf,
*************** listForeignServers(const char *pattern,
*** 3786,3792 ****
" d.description AS \"%s\"",
gettext_noop("Type"),
gettext_noop("Version"),
! gettext_noop("Options"),
gettext_noop("Description"));
}
--- 3786,3792 ----
" d.description AS \"%s\"",
gettext_noop("Type"),
gettext_noop("Version"),
! gettext_noop("FDW Options"),
gettext_noop("Description"));
}
*************** listUserMappings(const char *pattern, bo
*** 3849,3855 ****
if (verbose)
appendPQExpBuffer(&buf,
",\n um.umoptions AS \"%s\"",
! gettext_noop("Options"));
appendPQExpBuffer(&buf, "\nFROM pg_catalog.pg_user_mappings um\n");
--- 3849,3855 ----
if (verbose)
appendPQExpBuffer(&buf,
",\n um.umoptions AS \"%s\"",
! gettext_noop("FDW Options"));
appendPQExpBuffer(&buf, "\nFROM pg_catalog.pg_user_mappings um\n");
*************** listForeignTables(const char *pattern, b
*** 3905,3911 ****
appendPQExpBuffer(&buf,
",\n ft.ftoptions AS \"%s\",\n"
" d.description AS \"%s\"",
! gettext_noop("Options"),
gettext_noop("Description"));
appendPQExpBuffer(&buf,
--- 3905,3911 ----
appendPQExpBuffer(&buf,
",\n ft.ftoptions AS \"%s\",\n"
" d.description AS \"%s\"",
! gettext_noop("FDW Options"),
gettext_noop("Description"));
appendPQExpBuffer(&buf,
diff --git a/src/test/regress/expected/foreign_data.out b/src/test/regress/expected/foreign_data.out
index 5c48d83..4b60e8c 100644
*** a/src/test/regress/expected/foreign_data.out
--- b/src/test/regress/expected/foreign_data.out
*************** DROP FOREIGN DATA WRAPPER foo;
*** 53,59 ****
CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1');
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {testing=1} |
--- 53,59 ----
CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1');
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {testing=1} |
*************** ERROR: option "testing" provided more t
*** 66,72 ****
CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1', another '2');
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
------------+-------------------+---------+--------------------------+-------------------+-----------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {testing=1,another=2} |
--- 66,72 ----
CREATE FOREIGN DATA WRAPPER foo OPTIONS (testing '1', another '2');
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
------------+-------------------+---------+--------------------------+-------------------+-----------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {testing=1,another=2} |
*************** HINT: Must be superuser to create a for
*** 81,92 ****
RESET ROLE;
CREATE FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+---------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | postgresql_fdw_validator | | |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
-- ALTER FOREIGN DATA WRAPPER
--- 81,92 ----
RESET ROLE;
CREATE FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | postgresql_fdw_validator | | |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
-- ALTER FOREIGN DATA WRAPPER
*************** ALTER FOREIGN DATA WRAPPER foo VALIDATOR
*** 98,109 ****
ERROR: function bar(text[], oid) does not exist
ALTER FOREIGN DATA WRAPPER foo NO VALIDATOR;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+---------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');
--- 98,109 ----
ERROR: function bar(text[], oid) does not exist
ALTER FOREIGN DATA WRAPPER foo NO VALIDATOR;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');
*************** ALTER FOREIGN DATA WRAPPER foo OPTIONS (
*** 113,134 ****
ERROR: option "c" not found
ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD x '1', DROP x);
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-----------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | {a=1,b=2} |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP a, SET b '3', ADD c '4');
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-----------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | {b=3,c=4} |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '2');
--- 113,134 ----
ERROR: option "c" not found
ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD x '1', DROP x);
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | {a=1,b=2} |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
ALTER FOREIGN DATA WRAPPER foo OPTIONS (DROP a, SET b '3', ADD c '4');
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | {b=3,c=4} |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '2');
*************** ALTER FOREIGN DATA WRAPPER foo OPTIONS (
*** 136,142 ****
ERROR: option "b" provided more than once
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
------------+-------------------+---------+--------------------------+-------------------+---------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {b=3,c=4,a=2} |
--- 136,142 ----
ERROR: option "b" provided more than once
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
------------+-------------------+---------+--------------------------+-------------------+---------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {b=3,c=4,a=2} |
*************** SET ROLE regress_test_role_super;
*** 151,157 ****
ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD d '5');
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
------------+-------------------+---------+--------------------------+-------------------+-------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {b=3,c=4,a=2,d=5} |
--- 151,157 ----
ALTER FOREIGN DATA WRAPPER foo OPTIONS (ADD d '5');
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
------------+-------------------+---------+--------------------------+-------------------+-------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | foreign_data_user | - | - | | {b=3,c=4,a=2,d=5} |
*************** HINT: Must be superuser to alter a fore
*** 170,176 ****
RESET ROLE;
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
------------+-------------------------+---------+--------------------------+-------------------+-------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | regress_test_role_super | - | - | | {b=3,c=4,a=2,d=5} |
--- 170,176 ----
RESET ROLE;
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
------------+-------------------------+---------+--------------------------+-------------------+-------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | regress_test_role_super | - | - | | {b=3,c=4,a=2,d=5} |
*************** DROP FOREIGN DATA WRAPPER IF EXISTS none
*** 184,190 ****
NOTICE: foreign-data wrapper "nonexistent" does not exist, skipping
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
------------+-------------------------+---------+--------------------------+-------------------+-------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | regress_test_role_super | - | - | | {b=3,c=4,a=2,d=5} |
--- 184,190 ----
NOTICE: foreign-data wrapper "nonexistent" does not exist, skipping
\dew+
List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
------------+-------------------------+---------+--------------------------+-------------------+-------------------+-------------
dummy | foreign_data_user | - | - | | | useless
foo | regress_test_role_super | - | - | | {b=3,c=4,a=2,d=5} |
*************** ALTER ROLE regress_test_role_super SUPER
*** 203,213 ****
DROP FOREIGN DATA WRAPPER foo;
DROP ROLE regress_test_role_super;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+---------+-------------
! dummy | foreign_data_user | - | - | | | useless
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(2 rows)
CREATE FOREIGN DATA WRAPPER foo;
--- 203,213 ----
DROP FOREIGN DATA WRAPPER foo;
DROP ROLE regress_test_role_super;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
! dummy | foreign_data_user | - | - | | | useless
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(2 rows)
CREATE FOREIGN DATA WRAPPER foo;
*************** CREATE SERVER s1 FOREIGN DATA WRAPPER fo
*** 215,239 ****
COMMENT ON SERVER s1 IS 'foreign server';
CREATE USER MAPPING FOR current_user SERVER s1;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+---------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
\des+
! List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options | Description
! ------+-------------------+----------------------+-------------------+------+---------+---------+----------------
! s1 | foreign_data_user | foo | | | | | foreign server
(1 row)
\deu+
! List of user mappings
! Server | User name | Options
! --------+-------------------+---------
s1 | foreign_data_user |
(1 row)
--- 215,239 ----
COMMENT ON SERVER s1 IS 'foreign server';
CREATE USER MAPPING FOR current_user SERVER s1;
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
! dummy | foreign_data_user | - | - | | | useless
! foo | foreign_data_user | - | - | | |
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(3 rows)
\des+
! List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description
! ------+-------------------+----------------------+-------------------+------+---------+-------------+----------------
! s1 | foreign_data_user | foo | | | | | foreign server
(1 row)
\deu+
! List of user mappings
! Server | User name | FDW Options
! --------+-------------------+-------------
s1 | foreign_data_user |
(1 row)
*************** NOTICE: drop cascades to 2 other object
*** 252,274 ****
DETAIL: drop cascades to server s1
drop cascades to user mapping for foreign_data_user
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+---------+-------------
! dummy | foreign_data_user | - | - | | | useless
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(2 rows)
\des+
! List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options | Description
! ------+-------+----------------------+-------------------+------+---------+---------+-------------
(0 rows)
\deu+
! List of user mappings
! Server | User name | Options
! --------+-----------+---------
(0 rows)
-- exercise CREATE SERVER
--- 252,274 ----
DETAIL: drop cascades to server s1
drop cascades to user mapping for foreign_data_user
\dew+
! List of foreign-data wrappers
! Name | Owner | Handler | Validator | Access privileges | FDW Options | Description
! ------------+-------------------+---------+--------------------------+-------------------+-------------+-------------
! dummy | foreign_data_user | - | - | | | useless
! postgresql | foreign_data_user | - | postgresql_fdw_validator | | |
(2 rows)
\des+
! List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description
! ------+-------+----------------------+-------------------+------+---------+-------------+-------------
(0 rows)
\deu+
! List of user mappings
! Server | User name | FDW Options
! --------+-----------+-------------
(0 rows)
-- exercise CREATE SERVER
*************** HINT: Valid options in this context are
*** 290,296 ****
CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbname 's8db');
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options | Description
------+-------------------+----------------------+-------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | | | | |
s2 | foreign_data_user | foo | | | | {host=a,dbname=b} |
--- 290,296 ----
CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbname 's8db');
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description
------+-------------------+----------------------+-------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | | | | |
s2 | foreign_data_user | foo | | | | {host=a,dbname=b} |
*************** CREATE SERVER t1 FOREIGN DATA WRAPPER fo
*** 312,318 ****
RESET ROLE;
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options | Description
------+-------------------+----------------------+-------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | | | | |
s2 | foreign_data_user | foo | | | | {host=a,dbname=b} |
--- 312,318 ----
RESET ROLE;
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description
------+-------------------+----------------------+-------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | | | | |
s2 | foreign_data_user | foo | | | | {host=a,dbname=b} |
*************** SET ROLE regress_test_role;
*** 336,342 ****
CREATE SERVER t2 FOREIGN DATA WRAPPER foo;
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options | Description
------+-------------------+----------------------+-------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | | | | |
s2 | foreign_data_user | foo | | | | {host=a,dbname=b} |
--- 336,342 ----
CREATE SERVER t2 FOREIGN DATA WRAPPER foo;
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description
------+-------------------+----------------------+-------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | | | | |
s2 | foreign_data_user | foo | | | | {host=a,dbname=b} |
*************** GRANT USAGE ON FOREIGN SERVER s1 TO regr
*** 366,372 ****
GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION;
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options | Description
------+-------------------+----------------------+-----------------------------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | foreign_data_user=U/foreign_data_user +| | 1.0 | {servername=s1} |
| | | regress_test_role=U/foreign_data_user | | | |
--- 366,372 ----
GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION;
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description
------+-------------------+----------------------+-----------------------------------------+--------+---------+------------------------------+-------------
s1 | foreign_data_user | foo | foreign_data_user=U/foreign_data_user +| | 1.0 | {servername=s1} |
| | | regress_test_role=U/foreign_data_user | | | |
*************** DETAIL: owner of server s1
*** 417,423 ****
privileges for foreign-data wrapper foo
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options | Description
------+-----------------------+----------------------+-----------------------------------------+--------+---------+---------------------------------+-------------
s1 | regress_test_indirect | foo | foreign_data_user=U/foreign_data_user +| | 1.1 | {servername=s1} |
| | | regress_test_role=U/foreign_data_user | | | |
--- 417,423 ----
privileges for foreign-data wrapper foo
\des+
List of foreign servers
! Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW Options | Description
------+-----------------------+----------------------+-----------------------------------------+--------+---------+---------------------------------+-------------
s1 | regress_test_indirect | foo | foreign_data_user=U/foreign_data_user +| | 1.1 | {servername=s1} |
| | | regress_test_role=U/foreign_data_user | | | |
*************** ALTER USER MAPPING FOR public SERVER t1
*** 585,591 ****
RESET ROLE;
\deu+
List of user mappings
! Server | User name | Options
--------+-------------------+-----------------------------
s4 | foreign_data_user |
s4 | public | {"mapping=is public"}
--- 585,591 ----
RESET ROLE;
\deu+
List of user mappings
! Server | User name | FDW Options
--------+-------------------+-----------------------------
s4 | foreign_data_user |
s4 | public | {"mapping=is public"}
*************** COMMENT ON FOREIGN TABLE ft1 IS 'ft1';
*** 654,671 ****
COMMENT ON COLUMN ft1.c1 IS 'ft1.c1';
\d+ ft1
Foreign table "public.ft1"
! Column | Type | Modifiers | Options | Storage | Description
--------+---------+-----------+---------------------------+----------+-------------
c1 | integer | not null | {param1=val1} | plain | ft1.c1
c2 | text | | {param2=val2,param3=val3} | extended |
c3 | date | | | plain |
Server: sc
! Options: {"delimiter=,","quote=\""}
Has OIDs: no
\det+
List of foreign tables
! Schema | Table | Server | Options | Description
--------+-------+--------+----------------------------+-------------
public | ft1 | sc | {"delimiter=,","quote=\""} | ft1
(1 row)
--- 654,671 ----
COMMENT ON COLUMN ft1.c1 IS 'ft1.c1';
\d+ ft1
Foreign table "public.ft1"
! Column | Type | Modifiers | FDW Options | Storage | Description
--------+---------+-----------+---------------------------+----------+-------------
c1 | integer | not null | {param1=val1} | plain | ft1.c1
c2 | text | | {param2=val2,param3=val3} | extended |
c3 | date | | | plain |
Server: sc
! FDW Options: {"delimiter=,","quote=\""}
Has OIDs: no
\det+
List of foreign tables
! Schema | Table | Server | FDW Options | Description
--------+-------+--------+----------------------------+-------------
public | ft1 | sc | {"delimiter=,","quote=\""} | ft1
(1 row)
*************** ALTER FOREIGN TABLE ft1 ALTER COLUMN c7
*** 706,712 ****
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);
\d+ ft1
Foreign table "public.ft1"
! Column | Type | Modifiers | Options | Storage | Description
--------+---------+-----------+---------------------------+----------+-------------
c1 | integer | not null | {param1=val1} | plain |
c2 | text | | {param2=val2,param3=val3} | extended |
--- 706,712 ----
ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 OPTIONS (SET p2 'V2', DROP p1);
\d+ ft1
Foreign table "public.ft1"
! Column | Type | Modifiers | FDW Options | Storage | Description
--------+---------+-----------+---------------------------+----------+-------------
c1 | integer | not null | {param1=val1} | plain |
c2 | text | | {param2=val2,param3=val3} | extended |
*************** ALTER FOREIGN TABLE ft1 ALTER COLUMN c8
*** 718,724 ****
c9 | integer | | | plain |
c10 | integer | | {p1=v1} | plain |
Server: sc
! Options: {"delimiter=,","quote=\""}
Has OIDs: no
-- can't change the column type if it's used elsewhere
--- 718,724 ----
c9 | integer | | | plain |
c10 | integer | | {p1=v1} | plain |
Server: sc
! FDW Options: {"delimiter=,","quote=\""}
Has OIDs: no
-- can't change the column type if it's used elsewhere
*************** ALTER FOREIGN TABLE foreign_schema.ft1 R
*** 750,756 ****
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1;
\d foreign_schema.foreign_table_1
Foreign table "foreign_schema.foreign_table_1"
! Column | Type | Modifiers | Options
------------------+---------+-----------+---------------------------
foreign_column_1 | integer | not null | {param1=val1}
c2 | text | | {param2=val2,param3=val3}
--- 750,756 ----
ALTER FOREIGN TABLE foreign_schema.ft1 RENAME TO foreign_table_1;
\d foreign_schema.foreign_table_1
Foreign table "foreign_schema.foreign_table_1"
! Column | Type | Modifiers | FDW Options
------------------+---------+-----------+---------------------------
foreign_column_1 | integer | not null | {param1=val1}
c2 | text | | {param2=val2,param3=val3}
*************** ALTER FOREIGN TABLE foreign_schema.ft1 R
*** 761,767 ****
c8 | text | | {p2=V2}
c10 | integer | | {p1=v1}
Server: sc
! Options: {quote=~,escape=@}
-- Information schema
SELECT * FROM information_schema.foreign_data_wrappers ORDER BY 1, 2;
--- 761,767 ----
c8 | text | | {p2=V2}
c10 | integer | | {p1=v1}
Server: sc
! FDW Options: {quote=~,escape=@}
-- Information schema
SELECT * FROM information_schema.foreign_data_wrappers ORDER BY 1, 2;