Create a read-only PostgreSQL user
Updated April 15, 2026 · 7 min read
Why a dedicated user
A separate user with only SELECT limits what Querify can ever do, even if something went wrong upstream. Run the commands below as a superuser (often postgres) in psql or any SQL console connected to your database.
Replace placeholders:
querify_readonly— username you wantyour_strong_password— a long random passwordyour_database— database name
Create the user
CREATE USER querify_readonly WITH PASSWORD 'your_strong_password';
Allow connection and usage
GRANT CONNECT ON DATABASE your_database TO querify_readonly;
\c your_database
GRANT USAGE ON SCHEMA public TO querify_readonly;
Grant read access to existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO querify_readonly;
Future tables (optional)
So new tables are readable automatically:
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT SELECT ON TABLES TO querify_readonly;
Use in Querify
In the connection form, set username to querify_readonly and the password you chose. Run Test connection before saving.
If your schema is not public, repeat GRANT for each schema you need. For help, email support@querify.ai.
Was this helpful?
Still need help? Email support@querify.ai