|
|
 | | From: | Honda Shigehiro | | Subject: | syntax error with example sql of createtable | | Date: | Thu, 06 Jan 2005 02:24:07 +0900 (JST) |
|
|
 | Hello,
I got a error when execute below command in http://developer.postgresql.org/docs/postgres/sql-createtable.html
postgres=# CREATE TABLE array (vector int[][]); ERROR: syntax error at or near "array" at character 14 LINE 1: CREATE TABLE array (vector int[][]);
^ (I tried it on 8.0.0rc2.)
'array' is a reserved word, so it needs quote to create table named array: postgres=# CREATE TABLE "array" (vector int[][]); CREATE TABLE
regards, -- Shigehiro Honda
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
|
|
 | | From: | Honda Shigehiro | | Subject: | Re: syntax error with example sql of createtable | | Date: | Fri, 07 Jan 2005 01:44:57 +0900 (JST) |
|
|
 | Hello, Thank you for fixing.
I notice that there is also example which cause a syntax error like "create table" in example of below URLs: http://developer.postgresql.org/docs/postgres/sql-release-savepoint.html http://developer.postgresql.org/docs/postgres/sql-savepoint.html
A word "table" in SQL "INSERT INTO table VALUES (3);" is reserved. So renaming or quoting are needed to avoid an error.
regards, -- Shigehiro Honda
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
|
|
|