Skip to content

v5.6 Chinese psql reference misstates script exit status and rollback #462

Open

Description

@Hanabi9248

The Chinese Tool Reference says that a script error makes psql return status 3 and sets ON_ERROR_STOP. In v5.6, enabling ON_ERROR_STOP before a failing SQL statement makes a noninteractive script stop with status 3. The default allows processing to continue, and the script can finish with status 0 despite an error.

The Chinese --single-transaction entry also promises rollback without explaining that psql sends ROLLBACK instead of COMMIT only when it detects a failure and ON_ERROR_STOP is enabled. In the v5.6 regression tests, a client-side \copy error can leave earlier changes committed when ON_ERROR_STOP is disabled. Please correct both statements. The English reference already describes the condition.

Chinese reference · English reference · v5.6 script exit path · v5.6 transaction handling · v5.6 regression expectations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions