mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add GRANT ON SEQUENCE syntax to support sequence-only permissions.
Continue to support GRANT ON [TABLE] for sequences for backward compatibility; issue warning for invalid sequence permissions. [Backward compatibility warning message.] Add USAGE permission for sequences that allows only currval() and nextval(), not setval(). Mention object name in grant/revoke warnings because of possible multi-object operations.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.118 2005/11/22 18:17:28 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.119 2006/01/21 02:16:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1889,7 +1889,8 @@ _tocEntryRequired(TocEntry *te, RestoreOptions *ropt, bool include_acls)
|
||||
if (strcmp(ropt->schemaNames, te->namespace) != 0)
|
||||
return 0;
|
||||
}
|
||||
if ((strcmp(te->desc, "TABLE") == 0) || (strcmp(te->desc, "TABLE DATA") == 0))
|
||||
if (strcmp(te->desc, "TABLE") == 0 ||
|
||||
strcmp(te->desc, "TABLE DATA") == 0)
|
||||
{
|
||||
if (!ropt->selTable)
|
||||
return 0;
|
||||
@ -2276,8 +2277,7 @@ _getObjectDescription(PQExpBuffer buf, TocEntry *te, ArchiveHandle *AH)
|
||||
const char *type = te->desc;
|
||||
|
||||
/* Use ALTER TABLE for views and sequences */
|
||||
if (strcmp(type, "VIEW") == 0 ||
|
||||
strcmp(type, "SEQUENCE") == 0)
|
||||
if (strcmp(type, "VIEW") == 0 || strcmp(type, "SEQUENCE") == 0)
|
||||
type = "TABLE";
|
||||
|
||||
/* objects named by a schema and name */
|
||||
|
Reference in New Issue
Block a user