Sometimes this kind of error happens when you create tables with different database users and try to SELECT
with a different user.
You can grant all privileges using below query.
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA schema_name TO username;
And also you can grant access for DML statements
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA schema_name TO username;