Access Rules and Groups
Last updated November 14, 2026 · By the SaturnSQL team
Pro plan feature
Access rules are part of SaturnSQL Guard. Admins set them.
Access rules decide which tables, columns and rows each person sees on a database. They apply in the SaturnSQL editor, in schedules and in every AI tool the person connects. You set them per group, so sales can see their region’s customers while contractors see no personal data at all.
Give a group its own rules
- Make a group. In Settings → Groups, choose New group, name it (for example Sales or Contractors) and add the people with Add person.
- Open the database. In Governance → Access rules, pick the connection.
- Add the group. Choose Add group and pick it from the list.
- Set its rules and save:
- Tables: all tables, only these tables, or all except these.
- Columns: hide a column, or mask it (redact, mask every character, keep the last few characters, or hash).
- Row filters: a table and a condition every row must meet, such as
region = 'EU'. - AI tools: rows per query, queries a minute and a timeout for that group’s AI tools and API keys.
The rules apply from the group’s next query. There is nothing to deploy and nothing to change in the database.
Rules for one person
Make a group with only that person in it, then add the group as above.
Everyone else
Everyone else is the last row on each database. It holds the rules for anyone who is in none of the groups listed above it, and starts with no restrictions. A common setup is to restrict Everyone else and add a group for the people who need more.
When someone is in two groups
On each database, the group highest in the list that the person belongs to applies, and rules from two groups are never combined. Use the arrows next to each group to change the order.
Hidden and masked columns
A query that names a hidden column is refused, and SELECT * on its table asks you to name the columns. Hidden columns are also left out of the schema. A masked column can be queried, but returns a masked value: [REDACTED], *****, the last few characters such as ******1234, or a short hash. A hash keeps equal values equal, so the column still works for joins and grouping.
What access rules don’t cover
SaturnSQL checks each query before it runs, so it can’t see inside database views or functions you wrote. On PostgreSQL it refuses built-in functions that read a table by name, such as query_to_xml(), unless an admin allows them for that database. For a hard guarantee, pair the rules with a restricted database user: each group’s rules can generate its setup SQL for PostgreSQL and MySQL. See security.
Access rules work on PostgreSQL, Redshift, MySQL, SQL Server and BigQuery.
Questions
How do I give one person different rules?
Make a group with only that person in Settings → Groups, then add the group to the database in Governance → Access rules and set its rules.
What happens when someone is in two groups?
On each database, the group highest in the list that the person belongs to applies. Rules from two groups are never combined. Use the arrows to change the order.
What is the difference between a hidden and a masked column?
A query that names a hidden column is refused, and the column is left out of the schema. A masked column can be queried, but returns a masked value instead of the real one. Hash keeps equal values equal, so the column still works for joins and grouping.
Do access rules apply to AI tools?
Yes. The same rules apply in the SaturnSQL editor, in schedules and in every AI tool or API key the person uses, and hidden tables and columns are left out of the schema the AI tool sees.
