From: David <stormbyte@gmail.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13655: Incorrect Syntax Error
Date: Thu, 1 Oct 2015 10:05:41 +0200
Message-ID: <20151001100541.29dfdb38@Zero.StormByte.org> (raw)
In-Reply-To: <13218.1443674688@sss.pgh.pa.us>
References: <20150930192526.359.78719@wrigleys.postgresql.org>
<CAJrrPGcUHwY6_PYhQXcuPKPm01--FzNDnxuRigLnbGs2uPSFpw@mail.gmail.com>
<CAKFQuwbgc3Zrd1H7MRYNAVcumv=M_oB3FtsiwQAfd5feL4Ffig@mail.gmail.com>
<CAJrrPGd7rBcHtS+ZG3TkRdANn4cLqXDmLbXb1BRxGNcFgQXCmA@mail.gmail.com>
<13218.1443674688@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
El Thu, 01 Oct 2015 00:44:48 -0400
Tom Lane <tgl@sss.pgh.pa.us> escribió:
> 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.
>
> >> Tab-completion should not interfere with script code provided
> >> non-interactively on standard input, or in a script file loaded
> >> using -f or \i
>
> > Tab-completion doesn't change <TAB> characters if the file passed
> > using -f or \i.
>
> 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.
>
> 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.
>
> 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.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: stormbyte@gmail.com
Subject: Re: BUG #13655: Incorrect Syntax Error
In-Reply-To: <20151001100541.29dfdb38@Zero.StormByte.org>
References: <20150930192526.359.78719@wrigleys.postgresql.org> <CAJrrPGcUHwY6_PYhQXcuPKPm01--FzNDnxuRigLnbGs2uPSFpw@mail.gmail.com> <CAKFQuwbgc3Zrd1H7MRYNAVcumv=M_oB3FtsiwQAfd5feL4Ffig@mail.gmail.com> <CAJrrPGd7rBcHtS+ZG3TkRdANn4cLqXDmLbXb1BRxGNcFgQXCmA@mail.gmail.com> <13218.1443674688@sss.pgh.pa.us> <20151001100541.29dfdb38@Zero.StormByte.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox