DataGrip read-only data source enforcement in query consoles
0 reputation · 18 Aug 2024, 05:45 UTC
Client-side Read-only Guard Behavior
DataGrip provides a Read-only option within the data source settings designed to prevent accidental data modification. This setting acts as a client-side guard rather than a server-side permission change, meaning the underlying database user retains their original grants.
Enforcement Boundary Uncertainty
There is a distinction between how the IDE handles modifications in the data editor versus the query console. While the data editor typically restricts direct cell edits when the read-only flag is active, the behavior of the query console remains a point of design uncertainty regarding enforcement levels.
When a data source is marked as read-only, it is unclear if DDL or DML statements executed via the console are blocked entirely, flagged with a warning, or passed directly to the server for execution based on the user's actual database privileges.
- Does the read-only flag block
UPDATEorDELETEstatements in the query console? - Is there a difference in enforcement between the data editor and the console?