Re: BUG #13655: Incorrect Syntax Error

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
Cc: "stormbyte(at)gmail(dot)com" <stormbyte(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13655: Incorrect Syntax Error
Date: 2015-10-01 01:56:06
Message-ID: CAKFQuwbgc3Zrd1H7MRYNAVcumv=M_oB3FtsiwQAfd5feL4Ffig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wednesday, September 30, 2015, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
wrote:

> On Thu, Oct 1, 2015 at 5:25 AM, <stormbyte(at)gmail(dot)com <javascript:;>>
> wrote:
> > The following bug has been logged on the website:
> >
> > Bug reference: 13655
> > Logged by: David
> > Email address: stormbyte(at)gmail(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Haribabu Kommi 2015-10-01 02:02:51 Re: BUG #13655: Incorrect Syntax Error
Previous Message Haribabu Kommi 2015-10-01 01:42:32 Re: BUG #13655: Incorrect Syntax Error