Read-Only User Setup.

Read-Only User Setup.

How to create a PostgreSQL user with limited access.

How to create a PostgreSQL user with limited access.

🔐 Security Best Practice

Always create a dedicated read-only user for Data Stoat. This ensures your data stays secure while giving Data Stoat only the access it needs to analyze your database.

  1. Connect to Your PostgreSQL Database

Connect to your PostgreSQL instance as a superuser (usually postgres) or a user with sufficient privileges to create users and grant permissions.

psql -h your-host -p 5432

Note: Replace your-host and your-database with your actual database connection details.

  1. Create the Data Stoat User

Create a new user specifically for Data Stoat with a secure password:

CREATE USER datastoat WITH PASSWORD 'your_secure_password_here'

Important: Replace your_secure_password_here with a strong, unique password. We recommend using a password manager to generate a secure password.

  1. Grant Schema Access

Give the user access to connect to the database and use the schema:

-- Grant connection to the database
GRANT CONNECT ON DATABASE your_database TO datastoat;

-- Grant usage on the schema (usually 'public')
GRANT USAGE ON SCHEMA public TO

  1. Grant Table Permissions

Grant read-only access to all current and future tables in the schema:

-- Grant SELECT on all existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO datastoat;

-- Grant SELECT on all future tables (important!)
ALTER DEFAULT PRIVILEGES IN SCHEMA public 
    GRANT SELECT ON TABLES TO

Why the second command? The ALTER DEFAULT PRIVILEGES ensures that any new tables created in the future will automatically be accessible to Data Stoat.

  1. Test the Connection

Verify that the new user can connect and access your data:

-- Test connection (run this in a new terminal)
psql -h your-host -p 5432 -U datastoat -d your-database

-- Test table access
SELECT COUNT(*) FROM

  1. Connect to Data Stoat

Now you can safely connect your database to Data Stoat using the read-only credentials. Data Stoat will be able to analyze your data structure and content without any risk to your database.

Questions? If you run into any issues during setup, please contact our support team at hello@datastoat.com

Docs

Company

Docs

Company

Docs

Company