The psql client returns a format web client cannot consume. The translation to JSON for example is really important. The reverse (speak SQL) is also quite true. That being said, my observation (and my own project too is guilty of this) is that a lot of ORM users simply map their model almost 1-1 in the API response. An example would be returning a Book the json basically contains every column as keys.