On Wed, Feb 24, 2016 at 11:24 PM, Aman Rathi <aman(dot)rathi0904(at)gmail(dot)com>
wrote:
> Hi,
>
> I am running a .sql file using psql.exe command. The command inserts data
> from a file into a table as is, no checks.
>
> Problem I am facing is when even if the command gives me an error, still
> it completes successfully. I am running this command via java, so am not
> able to catch the error.
>
> It would be of great help if you could rescue me from this situation.
>
>
>
psql --set=ON_ERROR_STOP=1
http://www.postgresql.org/docs/current/static/app-psql.html
David J.