Hi

po 17. 12. 2018 v 13:14 odesĂ­latel <haman...@t-online.de> napsal:

>
>
> 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
>

you need psql from PostgreSQL 10 and higher

there is a \if statement

Regards

Pavel

>
> Best regards
> Wolfgang
>
>
>

Reply via email to