BUG #14554: Tab on new line after VALUES clause in INSERT statement echoes opening bracket

From: t(dot)kitynski(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14554: Tab on new line after VALUES clause in INSERT statement echoes opening bracket
Date: 2017-02-20 00:21:05
Message-ID: 20170220002105.1268.33801@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14554
Logged by: Tomisław Kityński
Email address: t(dot)kitynski(at)gmail(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2017-02-20 02:27:09 Re: BUG #14553: Fatal Error - Role does not exist
Previous Message clive 2017-02-20 00:05:38 BUG #14553: Fatal Error - Role does not exist