Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-166

Column name 'language' causes errors during schema update

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Core - PostgreSql
    • None
    • PostgreSQL v8.2 on Windows XP

    Description

      Create a database with the following schema definition (I did this via an ant task)

      <?xml version="1.0"?>
      <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
      <database name="mydb">
      <table name="ADDRESS">
      <column name="ID" primaryKey="true" required="true" type="INTEGER"/>
      <column name="language" primaryKey="false" required="false" type="VARCHAR" size="256"/>
      <index name="IDX_LANG">
      <index-column name="language"/>
      </index>
      </table>
      </database>

      If you perform an schema update with the same definition you get an error, that the index column "language" could not be found in the table. Because of reasons I can only guess, the jdbs driver returns the index column name "language" in quotes so that the column is not found in the table definition.
      This is a bit strange but even if the identifier "language" is a keyword in PostgreSQL it is allowed as a column name and DdlUtils should consider this too.

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            s_huber Stefan Huber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: