conditionally terminate psql script

From: hamann(dot)w(at)t-online(dot)de
To: pgsql-general(at)postgresql(dot)org
Subject: conditionally terminate psql script
Date: 2018-12-17 12:13:49
Message-ID: wolfgang-1181217131349.A0420644@noten19.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

is there a way to stop execution of a psql script if a select returns some rows (or no rows)
The idea is to add a safety check on data, specifically to select all new rows that would conflict
on a bulk insert, show them and stop

Best regards
Wolfgang

Responses

Browse pgsql-general by date

  From Date Subject
Next Message s400t 2018-12-17 12:34:03 Creating 2D arrays for pg_copy_from, reading tab-delimted text file that contains comma and double quotes
Previous Message Dave Cramer 2018-12-17 11:26:52 Re: loading jdbc Driver in servlet