docs: Table USAGE_PRIVILEGES() {
  
          Table t = sysTables[USAGE_PRIVILEGES];
  
          if (t == null) {
              t = createBlankTable(sysTableHsqlNames[USAGE_PRIVILEGES]);
  
              addColumn(t, "GRANTOR", SQL_IDENTIFIER);        // not null
              addColumn(t, "GRANTEE", SQL_IDENTIFIER);        // not null
              addColumn(t, "OBJECT_CATALOG", SQL_IDENTIFIER);
              addColumn(t, "OBJECT_SCHEMA", SQL_IDENTIFIER);
              addColumn(t, "OBJECT_NAME", SQL_IDENTIFIER);    // not null
              addColumn(t, "OBJECT_TYPE", CHARACTER_DATA);    // not null
              addColumn(t, "PRIVILEGE_TYPE", CHARACTER_DATA);
              addColumn(t, "IS_GRANTABLE", YES_OR_NO);        // not null
  
              // order: COLUMN_NAME, PRIVILEGE
              // for unique: GRANTEE, GRANTOR, TABLE_NAME, TABLE_SCHEM, TABLE_CAT
              // false PK, as TABLE_SCHEM and/or TABLE_CAT may be null
              HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
                  sysTableHsqlNames[USAGE_PRIVILEGES].name, false,
                  SchemaObject.INDEX);
  
              t.createPrimaryKey(name, new int[] {
                  0, 1, 2, 3, 4, 5, 6, 7
              }, false);
  
              return t;
          }
  
          //
          Object[] row;
  
          //
          final int       grantor        = 0;
          final int       grantee        = 1;
          final int       object_catalog = 2;
          final int       object_schema  = 3;
          final int       object_name    = 4;
          final int       object_type    = 5;
          final int       privilege_type = 6;
          final int       is_grantable   = 7;
          PersistentStore store = database.persistentStoreCollection.getStore(t);
          Iterator objects =
              new WrapperIterator(database.schemaManager
                  .databaseObjectIterator(SchemaObject.SEQUENCE), database
                  .schemaManager.databaseObjectIterator(SchemaObject.COLLATION));
  
          objects = new WrapperIterator(
              objects,
              database.schemaManager.databaseObjectIterator(
                  SchemaObject.CHARSET));
          objects = new WrapperIterator(
              objects,
              database.schemaManager.databaseObjectIterator(
                  SchemaObject.DOMAIN));
  
  /*
          objects = new WrapperIterator(
              objects,
              database.schemaManager.databaseObjectIterator(SchemaObject.TYPE));
  */
          OrderedHashSet grantees =
              session.getGrantee().getGranteeAndAllRolesWithPublic();
  
          while (objects.hasNext()) {
              SchemaObject object = (SchemaObject) objects.next();
  
              for (int i = 0; i < grantees.size(); i++) {
                  Grantee granteeObject = (Grantee) grantees.get(i);
                  OrderedHashSet rights =
                      granteeObject.getAllDirectPrivileges(object);
                  OrderedHashSet grants =
                      granteeObject.getAllGrantedPrivileges(object);
  
                  if (!grants.isEmpty()) {
                      grants.addAll(rights);
  
                      rights = grants;
                  }
  
                  for (int j = 0; j < rights.size(); j++) {
                      Right right          = (Right) rights.get(j);
                      Right grantableRight = right.getGrantableRights();
  
                      row                 = t.getEmptyRowData();
                      row[grantor]        = right.getGrantor().getName().name;
                      row[grantee]        = right.getGrantee().getName().name;
                      row[object_catalog] = database.getCatalogName().name;
                      row[object_schema]  = object.getSchemaName().name;
                      row[object_name]    = object.getName().name;
                      row[object_type] =
                          SchemaObjectSet.getName(object.getName().type);
                      row[privilege_type] = Tokens.T_USAGE;
                      row[is_grantable] =
                          right.getGrantee() == object.getOwner()
                          || grantableRight.isFull() ? Tokens.T_YES
                                                     : Tokens.T_NO;;
  
                      try {
                          t.insertSys(store, row);
                      } catch (HsqlException e) {}
                  }
              }
          }
  
          return t;
      }