_Field index not legal???

Posted by Thomas Mercer-Hursh on 20-Mar-2014 12:04

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?

All Replies

Posted by Thomas Mercer-Hursh on 21-Mar-2014 14:20

Note that this is also true of

Posted by Thomas Mercer-Hursh on 21-Mar-2014 14:22

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 


Posted by gus on 24-Mar-2014 08:24

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.

Posted by Thomas Mercer-Hursh on 24-Mar-2014 09:20

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

This thread is closed