Re: INSERT doesn't like (<table>.<column>)

From: "Adam Levine" <adam_l_levine(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: INSERT doesn't like (<table>.<column>)
Date: 2000-10-09 10:23:28
Message-ID: F140C75tYKw2PSvTzQE00012719@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I personally have connected Dynamo against Oracle and MS-SQL w/o fail.
Those 2 systems, as well as SQLanywhere seem to support this syntax. If
this is a non-standard syntax, one might wonder what moved them to support
it. Perhaps in an effort to alias the table as is done on a select?
If this is indeed a very non-standard way of defining an INSERT, and there
is no quick way to resolve it (I'll change it on my side if I can find where
to start in the codebase), then I'll move this issue back to ATG where it
seems it might rightfully belong. Tho, it seems with a product as widely
supported as Dynamo that they would have encountered this problem before
now.

--- adam

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: adam_l_levine(at)hotmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] INSERT doesn't like (<table>.<column>)
Date: Mon, 09 Oct 2000 10:20:23 -0400

pgsql-bugs(at)postgresql(dot)org writes:
> I'm using Dynamo connected to Postgres. The PreparedStatement
> generated for an INSERT works on other dbs, but Postgres complains
> with a parsing error.
> specifically:
> INSERT into <table> (<table>.<column>) VALUES (<value>);

What's your definition of "other dbs"? The above statement is quite
clearly in violation of the SQL92 and SQL99 specifications:

<insert statement> ::=
INSERT INTO <table name>
<insert columns and source>

<insert columns and source> ::=
[ <left paren> <insert column list> <right paren> ]
<query expression>
| DEFAULT VALUES

<insert column list> ::= <column name list>

<column name list> ::=
<column name> [ { <comma> <column name> }... ]

<column name> ::= <identifier>

I'm not particularly excited about supporting non-SQL variant syntaxes
that add no functionality.

regards, tom lane

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2000-10-09 13:23:03 INSERT doesn't like (<table>.<column>)
Previous Message Srinivas Vallurupalli 2000-10-06 23:39:13 Error in creating field in a table