Re: psql.exe error near '^'

From: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Alexey Alexeev <gldragon(at)yandex(dot)ru>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: psql.exe error near '^'
Date: 2015-12-28 16:03:09
Message-ID: CACACo5SDYt07fpr0xg3YVt8Ou=c-BaKGpRFjzL7OYDUNG4EQsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

2015-12-24 19:40 GMT+01:00 Alexey Alexeev <gldragon(at)yandex(dot)ru>:

> Здравствуйте!
>
> При выполнении следующей команды
> psql.exe --dbname=MYDB --host=localhost --port=5432 --username=myuser
> --file=sql_try.sql --quiet --log-file=sql_try.log --output=sql_try.rslt
> --no-align --field-separator=^
>
> Даже не спросив пароль подключения к БД процесс зависает намертво. В
> первый раз это совсем повесило компьютер - пришлось холодную перезагрузку
> делать. Второй раз - успел отстрелить процесс из диспетчера задач.
>
> Проблема именно в "--field-separator=^"
>
> Если написать
> --field-separator=|
> или
> --field-separator="^"
> все работает правильно.
>
>
> ОС: Windows 7 pro SP1 x64
>
> C:\>psql --version
> psql (PostgreSQL) 9.4.0

Alexey,

Given the symptoms you describe, it appears to me that the ^ symbol has a
special[1] meaning on the command line in Windows. Did you consider
possibility that the shell interpreter was waiting for more input after ^
and newline (at least this is what happens if you try to model this in
Un*x-like shell with --field-separator=\<newline>)?

Did you see increased CPU usage by the psql process (was there one)?

Thank you.
--
Alex

[1] e.g, see this:
http://www.tomshardware.co.uk/forum/35565-45-when-special-command-line

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-12-28 16:12:07 Re: BUG #13834: llenado
Previous Message Michael Paquier 2015-12-28 15:28:44 Re: BUG #13822: Slave terminated - WAL contains references to invalid page