How to fix Cursor does not exist in PostgreSQL | DevErrors