Amazon Redshift safe mode and review
How Tablyne reviews Redshift writes, refuses dangerous statements in the strictest mode and keeps reads in a read-only transaction.
Redshift connections start with the safe mode that confirms writes. The rules below are enforced in the Rust side of the app, not only in the screen, so a statement cannot skip its review.
Reads
A read that the classifier accepts runs without a prompt, but inside a read-only transaction. If something slipped through as a write, the server refuses it with a read-only error. Tablyne also checks that a function called without a schema is not a user function with the same name as a system function, for example a Lambda UDF. If it is, nothing runs and you are told to qualify the name.
Writes and DDL
Anything that is not a read opens a review that shows the exact SQL and says that per-query cost is unavailable. The approval is tied to that SQL and to the connection target. If you change the query, switch the target or reconnect, the old approval is void and you review again.
Dangerous statements
DELETE or UPDATE without WHERE, TRUNCATE, DROP, COPY, UNLOAD, CALL and functions that end sessions get a stronger warning in the review. In the strictest safe mode, “confirm all”, they are refused outright.
Read-only connections
On a connection marked read-only, Tablyne refuses any statement that is not a read, and it will not end sessions. Statements it cannot classify are refused too.
What this does not cover
A view that calls a Lambda function, or a masking policy that does, can still call it during a read. Tablyne does not see inside the view. Use database permissions as well.