Here is what I did:
Create user:
CREATE USER user1 WITH PASSWORD 'userpass';
Create database with owner:
createdb -U postgres database1 -O user1
But the user user1 cannot run select statements. I have to do:
GRANT SELECT ON ALL TABLES IN SCHEMA public TO user1;
GRANT USAGE ON SCHEMA public TO user1;
Why it is happening so? Any way to grant all privileges including select to user while creating database. Is owner doesn't mean he can run select queries? How to simplify this? Thanks.