Other than that, this is based on the new am api by Alexander Korotkov [1]. It extends it by adding another column called amkind to the pg_am which can have either value "i" for index or "S" for sequence (same as relkind in pg_class for those).
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных