Carter Shanklin created HIVE-14417: -------------------------------------- Summary: HPL/SQL: Wrong syntax generated for Postgres INSERT Key: HIVE-14417 URL: https://issues.apache.org/jira/browse/HIVE-14417 Project: Hive Issue Type: Bug Components: hpl/sql Affects Versions: 2.1.0 Reporter: Carter Shanklin Priority: Minor
HPL/SQL doesn't claim any support for Postgres so I guess I can't really complain. But if you do connect to Postgres and try an insert, this happens: {code} ERROR: syntax error at or near "TABLE" at character 13 STATEMENT: INSERT INTO TABLE pgtable VALUES (1, 2, 'a') {code} This "INSERT INTO TABLE" stuff isn't used against MySQL, my guess the code generation assume it's Hive unless it's one of the other known databases so it inserts the non-standard Hive-ism. This was my configuration when this happened: {code} <configuration> <property> <name>hplsql.conn.default</name> <value>myhiveconn</value> </property> <property> <name>hplsql.conn.myhiveconn</name> <value>org.apache.hive.jdbc.HiveDriver;jdbc:hive2://hdp250.example.com:10000</value> </property> <property> <name>hplsql.conn.pgdbconn</name> <value>org.postgresql.Driver;jdbc:postgresql://hdp250.example.com/vagrant?user=vagrant&password=vagrant</value> </property> <property> <name>hplsql.conn.mydbconn</name> <value>com.mysql.jdbc.Driver;jdbc:mysql://hdp250.example.com:3306/hive;hive;vagrant</value> </property> </configuration> {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)