Much more progress.
I've test it earlier (before breaking everything by copy pasting in older methods) and read/write was working perfectly with PostgreSQL.