Re: paging
От | Peter Eisentraut |
---|---|
Тема | Re: paging |
Дата | |
Msg-id | Pine.LNX.4.30.0103262054390.1114-100000@peter.localdomain обсуждение исходный текст |
Ответ на | paging ("A. Van Hook" <hook@kcp.com>) |
Список | pgsql-sql |
A. Van Hook writes: > #!/usr/bin/expect > > set query [lindex $argv 0] > set query [lindex $argv 1] > > spawn psql imdb -U hook -n > expect "Password: "; > send "$passwd\n "; > expect "imdb=# "; > send "$query;\r"; > expect "imdb=# "; > send "\q;\r"; > > The problem is that long query returns invoke the paging option so you > can scroll a page a time. Paging doesn't work properly within the > script and even if it did , I would have to disable it in order to > redirect the output to a file or a pipe. Try psql -P pager to turn the pager off. Also you can probably use export PGPASSWORD=xyz psql ... to skip the password probe. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
В списке pgsql-sql по дате отправления: