class PgSubscriptionRelTable {

    public static final RelationName IDENT = new RelationName(PgCatalogSchemaInfo.NAME, "pg_subscription_rel");

    public static SystemTable<PgSubscriptionRelTable.PgSubscriptionRelRow> create() {<FILL_FUNCTION_BODY>}

    public static Iterable<PgSubscriptionRelTable.PgSubscriptionRelRow> rows(LogicalReplicationService logicalReplicationService) {
        return () -> {
            Stream<PgSubscriptionRelTable.PgSubscriptionRelRow> s = logicalReplicationService.subscriptions().entrySet().stream()
                .mapMulti(
                    (e, c) -> {
                        var sub = e.getValue();
                        sub.relations().forEach(
                            (r, rs) -> c.accept(
                                new PgSubscriptionRelRow(
                                    OidHash.subscriptionOid(e.getKey(), sub),
                                    new Regclass(OidHash.relationOid(OidHash.Type.TABLE, r), r.fqn()),
                                    sub.owner(),
                                    rs.state().pg_state(),
                                    rs.reason()
                                )
                            )
                        );
                    }
                );
            return s.iterator();
        };
    }

    public record PgSubscriptionRelRow(int subOid, Regclass relOid, String owner, String state, String state_reason) {}
}

        return SystemTable.<PgSubscriptionRelTable.PgSubscriptionRelRow>builder(IDENT)
            .add("srsubid", INTEGER, PgSubscriptionRelRow::subOid)
            .add("srrelid", REGCLASS, PgSubscriptionRelRow::relOid)
            .add("srsubstate", STRING, PgSubscriptionRelRow::state)
            .add("srsubstate_reason", STRING, PgSubscriptionRelRow::state_reason)
            // CrateDB doesn't have Log Sequence Number per table, only a seqNo per shard (see SysShardsTable)
            .add("srsublsn", LONG, ignored -> null)
            .build();
    
<no_super_class>