psql in the command line

Поиск
Список
Период
Сортировка
От
Тема psql in the command line
Дата
Msg-id E502FDA6FE0C5A4BB4EFA4250A1E049001DBE047@sxmbx51.corproot.net
обсуждение исходный текст
Ответы Re: psql in the command line  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-sql
<p><font face="Arial" size="2">Hi</font><p><font face="Arial" size="2">I need some help regarding psql
syntax.</font><br/><font face="Arial" size="2">I would like to copy text files into the database from the command line
ina script.</font><br /><font face="Arial" size="2">I have found already how can I do it as user
postrgres:</font><p><spanlang="en-gb"><font face="Arial" size="2">test:/opt/pgsql# echo "copy test from
'/data/log/bla';"| psql logdb</font></span><br /><span lang="en-gb"><font face="Arial"
size="2">COPY</font></span><p><spanlang="de-ch"><font face="Arial" size="2">But when I try to execute it as root user I
getthe following error:</font></span><p><span lang="de-ch"><font face="Arial" size="2">[est/data/log] su - postgres -c
"echo'copy test from /data/log/bla;'| psql logdb"</font></span><br /><span lang="de-ch"><font face="Arial"
size="2">ERROR: syntax error at or near "/" at character 16</font></span><br /><span lang="de-ch"><font face="Arial"
size="2">LINE1: copy test from /data/log/bla;</font></span><br /><span lang="de-ch"><font face="Arial" size="2">     
</font></span><br/><span lang="de-ch"><font face="Arial" size="2">I have already  tried with all kind of double and
singlequotes but it does not work.</font></span><br /><span lang="de-ch"><font face="Arial" size="2">Anybody has an
ideahow can I make it run?</font></span><p><span lang="de-ch"><font face="Arial" size="2">Thanks and
regards</font></span><br/><span lang="de-ch"><font face="Arial" size="2">Aniko</font></span> 

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

Предыдущее
От: Markus Schaber
Дата:
Сообщение: Re: Changing the transaction isolation level within the stored
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: psql in the command line