Re: scripting & psql issues

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: scripting & psql issues
Дата
Msg-id 1092910654.19932.44.camel@braydb
обсуждение исходный текст
Ответ на Re: scripting & psql issues  ("Bob Parkinson" <rwp@biome.ac.uk>)
Список pgsql-general
On Wed, 2004-08-18 at 16:26, Bob Parkinson wrote:
> I've started to use the "here document" idea a lot when writing scripts to do tasks.
>
> #!/usr/local/bin/bash
>
> psql -d myDB <<EOSQL
>
> select foo ....
> update bar;
> delete from ...
>
> EOSQL

If the here document is long and complicated, you should make that
command line

  psql -d myDB -f - <<EOSQL

so as to get the line number of any error (counting from the start of
the here document).



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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: libpq: passwords WAS: scripting & psql issues
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: Stored Procedures woes