How to Integrate TablePlus and Postgres Safely
Engineers use tableplus and postgres together to read data, test queries, and fix production bugs. This setup pairs a fast desktop client with a strong relational database. When teams connect desktop apps to live databases, security risks grow fast. Shared passwords and broad permissions can lead to lost data or leaks. A safe setup needs strict role limits, clear network rules, and full query logs. How tableplus and postgres handle login and data flow TablePlus runs on a user machine and ope
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Engineers use tableplus and postgres together to read data, test queries, and fix production bugs. This setup pairs a fast desktop client with a strong relational database.
When teams connect desktop apps to live databases, security risks grow fast. Shared passwords and broad permissions can lead to lost data or leaks. A safe setup needs strict role limits, clear network rules, and full query logs.
How tableplus and postgres handle login and data flow
TablePlus runs on a user machine and opens a direct network link to the database. The user types in a host address, port, username, and password or key. Once the database checks these details, it opens an active session for that user.
Every action in the desktop app sends SQL commands over this open link. When a user opens a table view, the app runs a read query behind the scenes. When a user edits a row in the grid, the app sends an update command.
The database checks every single command against the active role permissions. If the role has read rights, the database sends the matching rows back to the app. The app then stores those results in local memory so the user can view them.
Because the client holds results on the laptop, permissions matter at the database level. The SELECT privilege allows reading from any column or specific columns of a table or view. It also allows copying data out of the database to the local machine.
Common failure modes and how to scope roles
The biggest mistake teams make is sharing one admin login across the whole group. When five engineers use the same login, audit logs cannot show who ran a bad query. If one person leaves the team, you must rotate the password for everyone.
Another common failure is giving every user full write rights by mistake. In PostgreSQL, the special role name PUBLIC grants a privilege to every role on the system. By default, PUBLIC gets rights to connect to databases and create temp tables. It also gets rights to run functions and procedures unless the owner revokes those defaults.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Older databases also carry extra schema risks for desktop client users. In PostgreSQL 15 and later, the default setup blocks users from creating objects in the public schema. In earlier versions or upgraded databases, an admin must revoke CREATE on the public schema from PUBLIC.
To fix these issues, admins should set up group roles to manage permissions for many users. You grant specific table rights to the group role first. Then you grant individual user logins membership in that group role.
For daily work, give the group role read rights on safe columns only. Keep emails, phone numbers, card numbers, and national IDs out of broad read roles. If you use data masking, it rewrites matched fields in results before they reach the screen.
Securing network paths for desktop database clients
Database servers should never sit on the public internet with open ports. Teams must place databases inside private networks that block direct outside traffic. Users should connect through encrypted channels that verify both the user and the device.
Always turn on TLS encryption between the desktop client and the database server. Encryption stops attackers on local networks from reading passwords or query results in transit. You should also set idle session timeouts on the database so open laptops do not stay logged in.
Check every Postgres query on the wire
Database roles and network rules decide who can open a session. They do not read what each SQL statement does after login. With hoop.dev, you run an open-source proxy, a sidecar for your Postgres. It runs beside your database and reads the Postgres wire protocol. Your apps and agents keep their login details and change only the host and port in the connection string their tool uses.
Before a query runs, hoop.dev guardrails check the statement by its effect, table, or pattern. They refuse bad deletes or drops with a real Postgres error. On the way back, hoop.dev data masking rewrites sensitive values in returned rows based on your rules. Every query and verdict goes to the audit trail. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and generates evidence for HIPAA, GDPR, and PCI DSS. See the code on GitHub.
Frequently asked questions
How do I give a TablePlus user read-only access in Postgres?
Create a group role and grant it the SELECT privilege on specific tables or columns. Then create a user role for the engineer and add it to that group role. Also check that PUBLIC does not grant extra write rights on your schemas.
Why can a new user still create objects or run functions in my database?
The special PUBLIC role gives every user default rights to run functions and create temp tables. On databases older than version 15, PUBLIC also lets users create objects in the public schema. An admin must revoke these default privileges from PUBLIC to lock down the account.
Can I limit which columns appear when a user opens a table?
Yes, the SELECT privilege can be granted on specific columns of a table or view. Still, many graphical clients run a full table select when opening the grid view. If a user lacks access to all columns, they must write a custom query for their allowed columns by default.
Related guides
In this post