diff --git a/src/lib/sql/table_privileges.sql b/src/lib/sql/table_privileges.sql index 564fc514..435409dc 100644 --- a/src/lib/sql/table_privileges.sql +++ b/src/lib/sql/table_privileges.sql @@ -64,7 +64,7 @@ where c.relkind in ('r', 'v', 'm', 'f', 'p') pg_has_role(c.relowner, 'USAGE') or has_table_privilege( c.oid, - 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER' + 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, MAINTAIN' ) or has_any_column_privilege(c.oid, 'SELECT, INSERT, UPDATE, REFERENCES') ) diff --git a/src/lib/types.ts b/src/lib/types.ts index e49882ae..30f4d15b 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -506,6 +506,7 @@ export const postgresTablePrivilegesSchema = Type.Object({ Type.Literal('TRUNCATE'), Type.Literal('REFERENCES'), Type.Literal('TRIGGER'), + Type.Literal('MAINTAIN'), ]), is_grantable: Type.Boolean(), }) @@ -525,6 +526,7 @@ export const postgresTablePrivilegesGrantSchema = Type.Object({ Type.Literal('TRUNCATE'), Type.Literal('REFERENCES'), Type.Literal('TRIGGER'), + Type.Literal('MAINTAIN'), ]), is_grantable: Type.Optional(Type.Boolean()), }) @@ -542,6 +544,7 @@ export const postgresTablePrivilegesRevokeSchema = Type.Object({ Type.Literal('TRUNCATE'), Type.Literal('REFERENCES'), Type.Literal('TRIGGER'), + Type.Literal('MAINTAIN'), ]), }) export type PostgresTablePrivilegesRevoke = Static