How to pass data from postgresql to resquest body on postman?

As I want to fetch the data from postgreSql database and pass to request body of an api.

note: not just postgresql any other database is possible?