public inbox for [email protected]
help / color / mirror / Atom feedsyntax error with example sql of createtable
4+ messages / 3 participants
[nested] [flat]
* syntax error with example sql of createtable
@ 2005-01-05 17:24 Honda Shigehiro <[email protected]>
0 siblings, 2 replies; 4+ messages in thread
From: Honda Shigehiro @ 2005-01-05 17:24 UTC (permalink / raw)
To: pgsql-docs
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: syntax error with example sql of createtable
@ 2005-01-05 18:03 Bruce Momjian <[email protected]>
parent: Honda Shigehiro <[email protected]>
1 sibling, 0 replies; 4+ messages in thread
From: Bruce Momjian @ 2005-01-05 18:03 UTC (permalink / raw)
To: Honda Shigehiro <[email protected]>; +Cc: pgsql-docs
Thanks. Changed to 'array_int'.
---------------------------------------------------------------------------
Honda Shigehiro wrote:
> 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
>
--
Bruce Momjian | http://candle.pha.pa.us
[email protected] | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: syntax error with example sql of createtable
@ 2005-01-06 16:44 Honda Shigehiro <[email protected]>
parent: Honda Shigehiro <[email protected]>
1 sibling, 1 reply; 4+ messages in thread
From: Honda Shigehiro @ 2005-01-06 16:44 UTC (permalink / raw)
To: pgsql-docs
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: syntax error with example sql of createtable
@ 2005-01-06 20:54 Tom Lane <[email protected]>
parent: Honda Shigehiro <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2005-01-06 20:54 UTC (permalink / raw)
To: Honda Shigehiro <[email protected]>; +Cc: pgsql-docs
Honda Shigehiro <[email protected]> writes:
> A word "table" in SQL "INSERT INTO table VALUES (3);" is reserved.
> So renaming or quoting are needed to avoid an error.
Fixed, thanks.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-01-06 20:54 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-05 17:24 syntax error with example sql of createtable Honda Shigehiro <[email protected]>
2005-01-05 18:03 ` Bruce Momjian <[email protected]>
2005-01-06 16:44 ` Honda Shigehiro <[email protected]>
2005-01-06 20:54 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox