With something like https://github.com/georgysavva/scany (or this https://pkg.go.dev/github.com/jackc/pgx/v5#RowToStructByName). More info here - https://github.com/jackc/pgx/issues/760
With something like https://github.com/georgysavva/scany (or this https://pkg.go.dev/github.com/jackc/pgx/v5#RowToStructByName). More info here - jackc/pgx#760