Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9bb6d97

Browse files
committed
More cleanup of FOREIGN TABLE permissions handling.
This commit fixes psql, pg_dump, and the information schema to beconsistent with the backend changes which I made as part of commitbe90032, and also includes arelated documentation tweak.Shigeru Hanada, with slight adjustment.
1 parentc5ab842 commit9bb6d97

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

‎doc/src/sgml/ref/grant.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ GRANT <replaceable class="PARAMETER">role_name</replaceable> [, ...] TO <replace
101101
There is also an option to grant privileges on all objects of the same
102102
type within one or more schemas. This functionality is currently supported
103103
only for tables, sequences, and functions (but note that <literal>ALL
104-
TABLES</> is considered to include views).
104+
TABLES</> is considered to include views and foreign tables).
105105
</para>
106106

107107
<para>

‎src/backend/catalog/information_schema.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,8 +2557,8 @@ CREATE VIEW _pg_foreign_tables AS
25572557
WHEREw.oid=s.srvfdw
25582558
ANDu.oid=c.relowner
25592559
AND (pg_has_role(c.relowner,'USAGE')
2560-
OR has_table_privilege(c.oid,'SELECT')
2561-
OR has_any_column_privilege(c.oid,'SELECT'))
2560+
OR has_table_privilege(c.oid,'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER')
2561+
OR has_any_column_privilege(c.oid,'SELECT, INSERT, UPDATE, REFERENCES'))
25622562
ANDn.oid=c.relnamespace
25632563
ANDc.oid=t.ftrelid
25642564
ANDc.relkind='f'

‎src/bin/pg_dump/pg_dump.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11804,7 +11804,6 @@ dumpTable(Archive *fout, TableInfo *tbinfo)
1180411804
namecopy=strdup(fmtId(tbinfo->dobj.name));
1180511805
dumpACL(fout,tbinfo->dobj.catId,tbinfo->dobj.dumpId,
1180611806
(tbinfo->relkind==RELKIND_SEQUENCE) ?"SEQUENCE" :
11807-
(tbinfo->relkind==RELKIND_FOREIGN_TABLE) ?"FOREIGN TABLE" :
1180811807
"TABLE",
1180911808
namecopy,NULL,tbinfo->dobj.name,
1181011809
tbinfo->dobj.namespace->dobj.name,tbinfo->rolname,

‎src/bin/psql/tab-complete.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,6 @@ psql_completion(char *text, int start, int end)
22342234
" UNION SELECT 'DATABASE'"
22352235
" UNION SELECT 'FOREIGN DATA WRAPPER'"
22362236
" UNION SELECT 'FOREIGN SERVER'"
2237-
" UNION SELECT 'FOREIGN TABLE'"
22382237
" UNION SELECT 'FUNCTION'"
22392238
" UNION SELECT 'LANGUAGE'"
22402239
" UNION SELECT 'LARGE OBJECT'"
@@ -2246,7 +2245,7 @@ psql_completion(char *text, int start, int end)
22462245
pg_strcasecmp(prev_wd,"FOREIGN")==0)
22472246
{
22482247
staticconstchar*constlist_privilege_foreign[]=
2249-
{"DATA WRAPPER","SERVER","TABLE",NULL};
2248+
{"DATA WRAPPER","SERVER",NULL};
22502249

22512250
COMPLETE_WITH_LIST(list_privilege_foreign);
22522251
}

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201104251
56+
#defineCATALOG_VERSION_NO201105131
5757

5858
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp