Search Postgresql Archives

Re: conditionally terminate psql script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hamann.w@xxxxxxxxxxx writes:

> Hi,
>
> many thanks -- too bad I am still using 9.3

Just because your server backend is 9.3 does not rule out using much
newer clients, such as psql.

HTH

>
> Best regards
> Wolfgang
>
>>> Hi
>>> >> po 17. 12. 2018 v 13:14 odesílatel <hamann.w@xxxxxxxxxxx> 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
>>> >
>>> >
>>> >
>>> 
>
>
>
>
>
>

-- 
Jerry Sievers
e: jerry.sievers@xxxxxxxxxxx
p: 312.241.7800





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux