Re: BUG #13655: Incorrect Syntax Error - Mailing list pgsql-bugs

From David
Subject Re: BUG #13655: Incorrect Syntax Error
Date
Msg-id 20151001100541.29dfdb38@Zero.StormByte.org
Whole thread Raw
In response to Re: BUG #13655: Incorrect Syntax Error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #13655: Incorrect Syntax Error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
El Thu, 01 Oct 2015 00:44:48 -0400
Tom Lane <tgl@sss.pgh.pa.us> escribi=C3=B3:
> Haribabu Kommi <kommi.haribabu@gmail.com> writes:
> > On Thu, Oct 1, 2015 at 11:56 AM, David G. Johnston
> > <david.g.johnston@gmail.com> wrote:
> >> On Wednesday, September 30, 2015, Haribabu Kommi
> >> <kommi.haribabu@gmail.com> wrote:
> >>> As I feel this is not a bug. psql has the tab complete feature
> >>> with the help of readline library.
> >>> Means it tries fill the command if the user provides the tab key
> >>> as input.
>=20
> >> Tab-completion should not interfere with script code provided
> >> non-interactively on standard input, or in a script file loaded
> >> using -f or \i
>=20
> > Tab-completion doesn't change <TAB> characters if the file passed
> > using -f or \i.
>=20
> Yeah.  I could not reproduce the reported error when feeding the file
> to psql using "-f file", "<file", or "\i file".  It is possible to get
> it by pasting the given text into a terminal window, so that readline
> can't tell that you didn't manually type the TAB.
>=20
> Worth noting here is you can turn off readline with the -n option
> to psql.  I've done that sometimes when there was a reason not to want
> TAB to act as command-completion.
>=20
>             regards, tom lane

(resent to mailing list instead of simple reply)
The real question here is: Since tab character triggers
autocompletion (or hints), when copy/pasted it has no effect, but:
Isn't it inconsistent that a thing like: "someField"SMALLINT works
whether a thing like: "someField""SomeCustomType" is not working?

Both forms have the exact same format: a field perfectly delimitated,
and after a type for that field with no space nor separation, both seems
legal to me, as parser knows exactly what is what (unlike the case
below) (even if you write directly without spaces at all).

I understand however, that using it without quoted (without
delimitation), can cause a syntax error in case like:
someFieldSMALLINT, but that's not the case.

Anyway, everything has been said in this regard, just wanted to say
this, as to my eyes, it's kind of inconsistent allow one case, but not
allowing the other.

David.

pgsql-bugs by date:

Previous
From: Fujii Masao
Date:
Subject: Re: GRANT USAGE ON SEQUENCE missing from psql command completion
Next
From: jesper@udby.com
Date:
Subject: BUG #13658: DELETE with syntax error in subselect deletes ALL