Skip to content

Commit e3d81d9

Browse files
Merge pull request #280197 from shriram-muthukrishnan/revokerectification
Changing the revoke sql statement since it had a typo
2 parents f741afc + 439b9a9 commit e3d81d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/postgresql/migrate/migration-service/concepts-user-roles-migration-service.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ Allowing unrestricted access to these system tables and views could lead to unau
6060
- If you have granted privileges to any users or roles for the affected pg_catalog tables and views, you encounter an error during the migration process. This error will be identified by the following pattern: **"pg_restore error: could not execute query GRANT/REVOKE PRIVILEGES on TABLENAME to username."**
6161
To resolve this error, it's necessary to revoke the select privileges granted to various users and roles on the pg_catalog tables and views. You can accomplish this by taking the following steps.
6262
1. Take a pg_dump of the database containing only the schema by executing the following command from a machine with access to your single server.
63-
```bash
63+
```sql
6464
pg_dump -h <singleserverhostname> -U <username@singleserverhostname> -d <databasename> -s > dump_output.sql
6565
```
6666
2. Search for **GRANT** statements associated with the impacted tables and views in the dump file. These GRANT statements follow this format.
67-
```bash
67+
```sql
6868
GRANT <privileges> to pg_catalog.<impacted tablename/viewname> to <username>;
6969
```
7070
3. If any such statements exist, ensure to execute the following command on your single server for each GRANT statement.
71-
```bash
72-
REVOKE <privileges> to pg_catalog.<impacted tablename/viewname> from <username>;
71+
```sql
72+
REVOKE <privileges> ON pg_catalog.<impacted tablename/viewname> from <username>;
7373
```
7474

7575
##### Understanding pg_pltemplate deprecation

0 commit comments

Comments
 (0)