Index: trunk/Ohana/src/libautocode/def/average-ps1-dev-2.d
===================================================================
--- trunk/Ohana/src/libautocode/def/average-ps1-dev-2.d	(revision 16266)
+++ trunk/Ohana/src/libautocode/def/average-ps1-dev-2.d	(revision 16810)
@@ -2,5 +2,5 @@
 EXTNAME      DVO_AVERAGE_PS1_DEV_2
 TYPE         BINTABLE
-SIZE         72
+SIZE         80
 DESCRIPTION  DVO Average Object Table
 
@@ -19,17 +19,26 @@
 FIELD dP,             PAR_ERR,    float,            parallax error,               arcsec
 
-FIELD Xp,             SIGMA_POS,  short, 	    position scatter,   	  1/100 arcsec
-FIELD Npsf,           NPSF,       unsigned short,   number of psf measurements
-FIELD Next,           NEXT,       unsigned short,   number of extended measurements
-FIELD Nmiss,          NMISS,      unsigned short,   number of missings
-FIELD psfOffset,      OFF_PSF,    int,     	    offset to first measurement
-FIELD extOffset,      OFF_EXT,    int,     	    offset to first measurement
-FIELD missOffset,     OFF_MISS,   int,     	    offset to first missing obs
+FIELD Xp,             SIGMA_POS,   short, 	    position scatter,   	  1/100 arcsec
+FIELD Nmeasure,       NMEASURE,    unsigned short,  number of psf measurements
+FIELD Nmissing,       NMISSING,    unsigned short,  number of missings
+FIELD Nextend,        NEXTEND,     unsigned short,  number of extended measurements
+FIELD measureOffset,  OFF_MEASURE, int,     	    offset to first psf measurement
+FIELD missingOffset,  OFF_MISSING, int,     	    offset to first missing obs
+FIELD extendOffset,   OFF_EXTEND,  int,     	    offset to first extended measurement
 
 FIELD code,           code,       unsigned short,   ID code (star; ghost; etc)
+FIELD dummy,          DUMMY,      char[2],          padding
 
-# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints for backwards compatibility?
-FIELD objID_hi,       OBJ_ID_HI,  unsigned int,     ID upper bytes
-FIELD objID_lo,       OBJ_ID_LO,  unsigned int,     ID lower bytes
+# Pan-STARRS uses a 64-bit detection ID.  keep this in two 32 bit ints
+# for C89 compatibility.  The objID is constructed based on the
+# position of first instatiation.  this is actually quite expensive
+# because we need to include the uniqueness test to construct this,
+# which requires a select for each new object.  Therefore, I will use
+# a table based ID (table ID + object ID), and we will have to
+# re-number the object IDs if we change the table density, OR treat
+# all subdivisions as entries which are from a foreign table.
+
+FIELD objID,          OBJ_ID,    unsigned int,   unique ID for object in table
+FIELD catID,          CAT_ID,    unsigned int,   unique ID for table in which object was first realized
 
 # this structure should only be used for internal representations
