>How could an application which gets written from scratch use PostgreSQL to implement >row based permissions?
Are you looking for this? https://stream.boxwatch.ru/docs/9.6/static/ddl-rowsecurity.html
Regards Daniel