[BUGS] BUG #14554: Tab on new line after VALUES clause in INSERT statementechoes opening bracket

Поиск
Список
Период
Сортировка
От t.kitynski@gmail.com
Тема [BUGS] BUG #14554: Tab on new line after VALUES clause in INSERT statementechoes opening bracket
Дата
Msg-id 20170220002105.1268.33801@wrigleys.postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14554
Logged by:          Tomisław Kityński
Email address:      t.kitynski@gmail.com
PostgreSQL version: 9.6.2
Operating system:   Linux (Debian, Wheezy)
Description:

This happens when connecting with 9.6.2 psql-client to 9.5.6 psql-server
(possibly it concerns also connecting to more recent servers). This runs on
Cygwin (Windows), after ssh to Debian Wheezy server, su postgres and then
psql testbase. First I copy-pasted some INSERT statement from my editor to
the console, but it didn't execute but waited for more input. I found out,
that I need to close round bracket. I checked my source, but it was correct.
It was like:

INSERT INTO foo.bar(bar_id, a, b)
VALUES
    (0, 'a', 'Aaa'),
    (1, 'b', 'Bbb')
;

but after pasting it into the console I got this:

testbase=# INSERT INTO foo.bar (bar_id, a, b)
testbase-# VALUES
testbase-# ( (0, 'a', 'Aaa'),
testbase(#  (1, 'b', 'Bbb')
testbase(# ;

Please note extra opening bracket in 3-rd line at the start of line.

This can be reproduced even by typing it manually, i.e. after INSERT line
one need to press enter, then enter VALUES clause, then enter, THEN TAB and
it is where opening bracket pops up for no apparent reason. Until 9.5.6
version of psql-client I was able to copy-paste scripts with indentation
tabs, thou they give a lot of beeps from terminal as the tried to (my guess)
auto complete current query but it wasn't able to find anything useful,
however the DML statement could be pasted and executed. Now it is impossible
(one need to change indentation to spaces to actually successfully paste a
tab indented query).

Greetings,
TK


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: clive@the-boughtons.net
Дата:
Сообщение: [BUGS] BUG #14553: Fatal Error - Role does not exist
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [BUGS] BUG #14553: Fatal Error - Role does not exist