We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug src/Sql/SqlPgsql.php line 47 is: return 'psql -q ON_ERROR_STOP=1 ';
This is the wrong syntax. The ON_ERROR_STOP is being ignored, you can see this if you remove the '-q' option.
To Reproduce Execute any drush sql command, e.g.: drush -v --debug sql-query "SELECT 1"
Now look at the SQL generated with the label 'Executing': Executing: psql -q ON_ERROR_STOP=1 --dbname=etc...
Expected behavior The sql generated should be: psql -q --set ON_ERROR_STOP=1
Actual behavior This causes an error on Windows when running any drush sql command. On MacOS (and presumably Linux) the variable is ignored.
Workaround Changing line 47 of src/Sql/SqlPgsql.php: return 'psql -q ON_ERROR_STOP=1 '; to return 'psql -q --set ON_ERROR_STOP=1 ';
Fixes it temporarily.
Additional information This code was added as a fix for #5650. Tagging @weitzman .
The text was updated successfully, but these errors were encountered:
Hey @ryansabir i would like to work on this issue, you can assign it to me. Thank you!!
Sorry, something went wrong.
No branches or pull requests
Describe the bug
src/Sql/SqlPgsql.php line 47 is:
return 'psql -q ON_ERROR_STOP=1 ';
This is the wrong syntax. The ON_ERROR_STOP is being ignored, you can see this if you remove the '-q' option.
To Reproduce
Execute any drush sql command, e.g.:
drush -v --debug sql-query "SELECT 1"
Now look at the SQL generated with the label 'Executing':
Executing: psql -q ON_ERROR_STOP=1 --dbname=etc...
Expected behavior
The sql generated should be:
psql -q --set ON_ERROR_STOP=1
Actual behavior
This causes an error on Windows when running any drush sql command. On MacOS (and presumably Linux) the variable is ignored.
Workaround
Changing line 47 of src/Sql/SqlPgsql.php:
return 'psql -q ON_ERROR_STOP=1 ';
to
return 'psql -q --set ON_ERROR_STOP=1 ';
Fixes it temporarily.
System Configuration
Additional information
This code was added as a fix for #5650. Tagging @weitzman .
The text was updated successfully, but these errors were encountered: