Re: BUG #13655: Incorrect Syntax Error
От | Haribabu Kommi |
---|---|
Тема | Re: BUG #13655: Incorrect Syntax Error |
Дата | |
Msg-id | CAJrrPGd7rBcHtS+ZG3TkRdANn4cLqXDmLbXb1BRxGNcFgQXCmA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #13655: Incorrect Syntax Error ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: BUG #13655: Incorrect Syntax Error
|
Список | pgsql-bugs |
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: >> >> On Thu, Oct 1, 2015 at 5:25 AM, <stormbyte@gmail.com> wrote: >> > The following bug has been logged on the website: >> > >> > Bug reference: 13655 >> > Logged by: David >> > Email address: stormbyte@gmail.com >> > 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 Tab-completion doesn't change <TAB> characters if the file passed 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. Tab-completion comes into picture only when user tries to write the query or paste the query from a notepad with tab characters in it. Regards, Hari Babu Fujitsu Australia
В списке pgsql-bugs по дате отправления: