Maintaining your database logic in version control and versioning the deployed code can be a bit problematic.
Conversely, providing a standardized pgsql module through which data is updated and retrieved can help standardize access logic across multiple languages and libraries. And I concur that database portability is a thing people like to discuss, but rarely occurs. Portability is important for general ORM tools, less so for corporate projects (there are always exceptions). Like any tool, needs to be used wisely. I've worked on a project that has 10s of thousands of lines of business logic in the database and it makes perfect sense for that environment. --Ray