Thread

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

    Adam Levine <adam_l_levine@hotmail.com> — 2000-10-09T10:23:28Z

    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@sss.pgh.pa.us>
    To: adam_l_levine@hotmail.com, pgsql-bugs@postgresql.org
    Subject: Re: [BUGS] INSERT doesn't like (<table>.<column>)
    Date: Mon, 09 Oct 2000 10:20:23 -0400
    
    pgsql-bugs@postgresql.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.