_Field index not legal??? - Forum - OpenEdge RDBMS - Progress Community

_Field index not legal???

 Forum

_Field index not legal???

  • I am writing a tool in which I wish to have a copy of the schema of a DB in ordinary tables, i.e., the schema of the application DB represented in an analysis DB.  So, I am creating tables which mirror, more or less, the metaschema tables.  But, I just encountered an interesting error.  One of the indexes of _Field is:

    ADD INDEX "_Field-Name" ON "_Field" 
      AREA "Schema Area"
      UNIQUE
      INDEX-FIELD "_Field-Name" ASCENDING ABBREVIATED 
      INDEX-FIELD "_File-recid" ASCENDING 

    My version of this is identical except for the change in table and field names to make then different and regular.  But, when I load this .df, I get:

    ** Abbreviate only allowed on last Index-Field which must be character. (362)

    Now, it *is* character, just like in _Field.  Now, myself, I would not make it an abbreviated index because I dislike them and that may be my solution, by why is this legal for _Field and not for a user table?

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • Note that this is also true of

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • Let me try pushing the right button.  It is also true of

    ADD INDEX "_Db/File" ON "_File" 
      AREA "Schema Area"
      UNIQUE
      INDEX-FIELD "_Db-recid" ASCENDING 
      INDEX-FIELD "_File-Name" ASCENDING ABBREVIATED 
      INDEX-FIELD "_Owner" ASCENDING 
    
    ADD INDEX "_Dump-Name" ON "_File" 
      AREA "Schema Area"
      UNIQUE
      INDEX-FIELD "_Db-recid" ASCENDING 
      INDEX-FIELD "_Dump-name" ASCENDING ABBREVIATED 
      INDEX-FIELD "_Owner" ASCENDING 
    


    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • Abbreviated indexes are an obsolete and useles feature. Furthermore, the abbreviated index is not different from a non-abbreviated index. So you lose nothing by leaving the word abbreviated off your own index definitions.

  • Well, that's what I have done, but someone should create a task to correct the metaschema ...

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com