Skip to main content

Best Practices

Create a Read-Only User

We strongly recommend creating a dedicated database user with read-only permissions:
CREATE USER cobi_reader WITH PASSWORD 'secure_password';
GRANT CONNECT ON DATABASE your_database TO cobi_reader;
GRANT USAGE ON SCHEMA public TO cobi_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO cobi_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO cobi_reader;

Limit Table Access

If you only want Cobi to access specific tables, grant permissions selectively:
-- Grant access to specific tables only
GRANT SELECT ON customers, transactions, orders TO cobi_reader;

Troubleshooting

See the Troubleshooting page for help with connection issues.