PostgreSQL
Connect a PostgreSQL Database
Connect PostgreSQL to Wobby
To connect your PostgreSQL database to Wobby, follow these steps:
Create a login role and user in your database.
Grant read-only permissions.
Allow Wobby’s IP address through your firewall or security rules.
Set up the connection in the Wobby interface.
⚠️ Wobby’s agents only run read-only queries on your data. Write permissions are never used.
1. Create Role and User in PostgreSQL
In PostgreSQL, roles can act as both login accounts and permission holders. The following SQL sets up a login with read-only access for Wobby:
-- Replace placeholder values with your actual schema and secure password
-- Create login role
CREATE ROLE wobby_login WITH LOGIN PASSWORD '<your_secure_password>';
-- Grant connection and usage privileges on the database
GRANT CONNECT ON DATABASE your_database_name TO wobby_login;
-- Grant usage on schema
GRANT USAGE ON SCHEMA your_schema_name TO wobby_login;
-- Grant read-only access to existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA your_schema_name TO wobby_login;
-- Grant read-only access to existing views
GRANT SELECT ON ALL SEQUENCES IN SCHEMA your_schema_name TO wobby_login;
✅ This setup gives Wobby read access to the specified schema.
2. Optional: Auto-Grant Future Access
PostgreSQL supports default privileges, so you can configure it to automatically grant access to new tables and views:
-- Make sure this is run by a role that owns the schema
ALTER DEFAULT PRIVILEGES IN SCHEMA your_schema_name
GRANT SELECT ON TABLES TO wobby_login;
🔄 This ensures Wobby gets access to future tables without needing manual grants.
3. Allow Wobby’s IP Address
If your PostgreSQL server is protected by firewall or network rules, allow inbound traffic from Wobby’s static IP:
34.77.172.158
This is required for Wobby’s agents to connect.
4. Set Up the Connection in Wobby
Go to Wobby → Data Sources.
Click New PostgreSQL Connection.
Fill in the following details:
Host: your PostgreSQL server address
Port: typically 5432
Database name: the one where
wobby_login
has accessUsername:
wobby_login
Password: the password you defined earlier
Test the connection and save.
Last updated
Was this helpful?