Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cherry-pick 1.1: sql: revert the default behavior of DROP DATABASE to CASCADE #19209

Merged
merged 1 commit into from Oct 19, 2017

Commits on Oct 12, 2017

  1. sql: revert the default behavior of DROP DATABASE to CASCADE

    ... because that's what DROP DATABASE does in postgres, and schema
    migration tools expect it to work this way.
    
    However, in order to avoid unpleasant surprises by user, make
    DROP DATABASE *without* behavior specifier also error out
    when the session variable `sql_safe_updates` is set. This is
    the case e.g. in interactive shells by default. For example:
    
    ```
    root@:26257/> drop database t;
    pq: rejected: DROP DATABASE on non-empty database without explicit CASCADE (sql_safe_updates = true)
    ```
    knz committed Oct 12, 2017
    Configuration menu
    Copy the full SHA
    cd260d4 View commit details
    Browse the repository at this point in the history