Downloaded library and made a small test with mysql which worked fine, when 
trying same code with postgres generated sql has quotes (`) which postgres 
is not recognizing so I'm getting an error

this is my code:


String url = "jdbc:postgresql://localhost:5432/dbname";

            Class.forName("org.postgresql.Driver").newInstance();

            conn = DriverManager.getConnection(url, "userName", "password");

            DSLContext create = DSL.using(conn, SQLDialect.MYSQL);

            Result<Record2<Object,String>> rs= create.select(fieldByName(
"tablename","id"),concat(fieldByName("tablename","objschema"),fieldByName(
"tablename","objname")))

             .from(tableByName("tablename")).fetch();


error is:

SQL [select `tablename`.`id`, concat(cast(`tablename `.`objschema` as 
char), cast(`tablename `.`objname` as char)) from `tablename `]; ERROR: 
syntax error at or near "."

  Position: 24


if I copy the generated sql and remove the quotes it works fine, 


thanks in advance

Jose Suero

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to