Redshift SET ON_ERROR_STOP using psql and Examples
On Redshift data warehouse appliance, you will be executing multiple SQL statement in single SQL file. In this article, we will discuss about the Redshift SET ON_ERROR_STOP variable to stop the execution in case one of the sql statement encountered error inside SQL script file. Without setting this system variable, Amazon Redshitf will continue with other statements ignoring the failed query. PostgreSQL (psql) EXIT Status psql returns following EXIT status when you are executing Redshfit SQL from files: 0: to the shell if it finished sql execution normally. 1: if…