There are two schemes
schema2. I have created a view in the latter one based on the first one.
CREATE VIEW schema2.view AS SELECT * FROM schema1.table
While keeping the database connection alive I can access the view, e. g.
SELECT * FROM schema2.view
However, after closing the connection and reconnect to the data base, I can not:
SELECT * FROM schema2.view > ERROR: permission denied for relation view
Curiously, I can execute the query of the view manually:
SELECT * FROM schema1.table
Only the view does not work. Where get the permissions lost? And why?