Re: conditionally terminate psql script

Поиск
Список
Период
Сортировка
От Jerry Sievers
Тема Re: conditionally terminate psql script
Дата
Msg-id 87efag2o5l.fsf@jsievers.enova.com
обсуждение исходный текст
Ответ на Re: conditionally terminate psql script  (hamann.w@t-online.de)
Ответы Re: conditionally terminate psql script
Список pgsql-general
hamann.w@t-online.de 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@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
>>> >
>>> >
>>> >
>>>
>
>
>
>
>
>

--
Jerry Sievers
e: jerry.sievers@comcast.net
p: 312.241.7800


В списке pgsql-general по дате отправления:

Предыдущее
От: rob stone
Дата:
Сообщение: Re: Creating 2D arrays for pg_copy_from, reading tab-delimted textfile that contains comma and double quotes
Следующее
От: Moreno Andreo
Дата:
Сообщение: Re: REVOKE to an user that doesn't exist