title: "Ambiguous type name" error while generating code with jOOQ and Gradle
body: <p>When I try to generate code with jOOQ I get a lot of errors like:</p>
  <pre><code>     Ambiguous type name      :
  The object pg_catalog.unnest generates a type org.jooq.example.gradle.db.pg_catalog.tables.Unnest
      which conflicts with the existing type
      org.jooq.example.gradle.db.pg_catalog.tables.Unnest on some operating systems.
      Use a custom generator strategy to disambiguate the types.
  </code></pre>
  <p>Not sure what an operating system should have to do with it. Never used jOOQ before. As I understand it should connect to a Postgres db and generate some java code that can be used later to run queries against the db.</p>
  <p>I have the following configuration in <code>build.gradle</code> (taken from <a href="https://www.jooq.org/doc/latest/manual/code-generation/codegen-gradle/" rel="nofollow noreferrer">https://www.jooq.org/doc/latest/manual/code-generation/codegen-gradle/</a>)</p>
  <pre><code>// Use your favourite XML builder to construct the code generation configuration file
  // ----------------------------------------------------------------------------------
  def writer = new StringWriter()
  def xml = new groovy.xml.MarkupBuilder(writer)
          .configuration('xmlns': 'http://www.jooq.org/xsd/jooq-codegen-3.13.0.xsd') {
              jdbc() {
                  driver('org.postgresql.Driver')
                  url('jdbc:postgresql://localhost:5432/metrics')
                  user('postgres')
                  password('pwd')
              }
              generator() {
                  database() {
                  }
  
                  // Watch out for this caveat when using MarkupBuilder with &quot;reserved names&quot;
                  // - https://github.com/jOOQ/jOOQ/issues/4797
                  // - http://stackoverflow.com/a/11389034/521799
                  // - https://groups.google.com/forum/#!topic/jooq-user/wi4S9rRxk4A
                  generate() {
                  }
                  target() {
                      packageName('org.jooq.example.gradle.db')
                      directory('src/main/java')
                  }
              }
          }
  
  // Run the code generator
  // ----------------------
  org.jooq.codegen.GenerationTool.generate(writer.toString())
  </code></pre>
  <p>As a beginner I'm overwhelmed with this error...</p>