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

From David G. Johnston
Subject Re: BUG #13655: Incorrect Syntax Error
Date
Msg-id CAKFQuwbgc3Zrd1H7MRYNAVcumv=M_oB3FtsiwQAfd5feL4Ffig@mail.gmail.com
Whole thread Raw
In response to Re: BUG #13655: Incorrect Syntax Error  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Responses Re: BUG #13655: Incorrect Syntax Error  (Haribabu Kommi <kommi.haribabu@gmail.com>)
List pgsql-bugs
On Wednesday, September 30, 2015, Haribabu Kommi <kommi.haribabu@gmail.com>
wrote:

> On Thu, Oct 1, 2015 at 5:25 AM,  <stormbyte@gmail.com <javascript:;>>
> wrote:
> > The following bug has been logged on the website:
> >
> > Bug reference:      13655
> > Logged by:          David
> > Email address:      stormbyte@gmail.com <javascript:;>
> > PostgreSQL version: 9.4.4
> > Operating system:   Gentoo Linux
> > Description:
> >
> > When using field names with "", and custom data type, with its name also
> > with "", a syntax error is triggered in CREATE TABLE when tab character
> is
> > used instead of spaces.
> >
> > To reproduce, create a sql file with: (Insert tab and NOT space when
> <TAB>
> > is specified)
> > CREATE TYPE "GPSPoint" AS ("lat" DECIMAL(9,6), "lon" DECIMAL(9,6));
> >
> > CREATE TABLE "TestTable" ("testGPS"<TAB>"GPSPoint" NOT NULL);
> >
> > Save it, and copy/paste to psql, you will see an syntax error near NOT.
> >
> > That is workarounded by inserting <SPACE> before or instead of <TAB>, but
> > should not trigger any syntax error, as the same syntax works for bundled
> > types, so the following does not fail:
> > CREATE TABLE "TestTable" ("test"<TAB>SMALLINT NOT NULL);
> >
> > This is a low priority bug, but a bit annoying
>
> 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

Not having tested this myself the OP is lacking in their description of how
exactly they are passing the SQL to psql.  "Copy/paste to psql" is
decidedly unclear.

David J.

pgsql-bugs by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: BUG #13655: Incorrect Syntax Error
Next
From: Haribabu Kommi
Date:
Subject: Re: BUG #13655: Incorrect Syntax Error