Index: /trunk/dbconfig/Makefile
===================================================================
--- /trunk/dbconfig/Makefile	(revision 11112)
+++ /trunk/dbconfig/Makefile	(revision 11113)
@@ -18,4 +18,7 @@
 	chmod +x ../ippdb/autogen.sh
 
+foo: src
+	$(MAKE) -C ../ippdb install
+
 build : ippdb ippdb.mdc
 
Index: /trunk/dbconfig/config.md
===================================================================
--- /trunk/dbconfig/config.md	(revision 11112)
+++ /trunk/dbconfig/config.md	(revision 11113)
@@ -2,4 +2,4 @@
     pkg_name        STR     ippdb
     pkg_namespace   STR     ippdb
-    pkg_version     STR     0.0.74
+    pkg_version     STR     0.0.75
 END
Index: /trunk/ippdb/configure.ac
===================================================================
--- /trunk/ippdb/configure.ac	(revision 11112)
+++ /trunk/ippdb/configure.ac	(revision 11113)
@@ -7,5 +7,5 @@
 AC_PREREQ(2.59)
 
-AC_INIT([ippdb], [0.0.74], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [0.0.75], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
Index: /trunk/ippdb/src/ippdb.c
===================================================================
--- /trunk/ippdb/src/ippdb.c	(revision 11112)
+++ /trunk/ippdb/src/ippdb.c	(revision 11113)
@@ -9224,5 +9224,5 @@
 static void detProcessedImfileRowFree(detProcessedImfileRow *object);
 
-detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     detProcessedImfileRow *_object;
@@ -9241,4 +9241,5 @@
     _object->b1_uri = psStringCopy(b1_uri);
     _object->b2_uri = psStringCopy(b2_uri);
+    _object->fault = fault;
 
     return _object;
@@ -9308,4 +9309,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETPROCESSEDIMFILE_TABLE_NAME, md);
@@ -9321,5 +9327,5 @@
 }
 
-bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -9371,4 +9377,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -9397,5 +9408,5 @@
 bool detProcessedImfileInsertObject(psDB *dbh, detProcessedImfileRow *object)
 {
-    return detProcessedImfileInsert(dbh, object->det_id, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri);
+    return detProcessedImfileInsert(dbh, object->det_id, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri, object->fault);
 }
 
@@ -9520,4 +9531,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -9579,6 +9595,11 @@
         return false;
     }
-
-    return detProcessedImfileRowAlloc(det_id, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detProcessedImfileRowAlloc(det_id, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);
 }
 psArray *detProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -9692,5 +9713,5 @@
 static void detProcessedExpRowFree(detProcessedExpRow *object);
 
-detProcessedExpRow *detProcessedExpRowAlloc(psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+detProcessedExpRow *detProcessedExpRowAlloc(psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     detProcessedExpRow *_object;
@@ -9707,4 +9728,5 @@
     _object->b1_uri = psStringCopy(b1_uri);
     _object->b2_uri = psStringCopy(b2_uri);
+    _object->fault = fault;
 
     return _object;
@@ -9762,4 +9784,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETPROCESSEDEXP_TABLE_NAME, md);
@@ -9775,5 +9802,5 @@
 }
 
-bool detProcessedExpInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+bool detProcessedExpInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -9815,4 +9842,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -9841,5 +9873,5 @@
 bool detProcessedExpInsertObject(psDB *dbh, detProcessedExpRow *object)
 {
-    return detProcessedExpInsert(dbh, object->det_id, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri);
+    return detProcessedExpInsert(dbh, object->det_id, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri, object->fault);
 }
 
@@ -9954,4 +9986,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -10003,6 +10040,11 @@
         return false;
     }
-
-    return detProcessedExpRowAlloc(det_id, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detProcessedExpRowAlloc(det_id, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);
 }
 psArray *detProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -10116,5 +10158,5 @@
 static void detStackedImfileRowFree(detStackedImfileRow *object);
 
-detStackedImfileRow *detStackedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev)
+detStackedImfileRow *detStackedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psS16 fault)
 {
     detStackedImfileRow *_object;
@@ -10131,4 +10173,5 @@
     _object->bg_stdev = bg_stdev;
     _object->bg_mean_stdev = bg_mean_stdev;
+    _object->fault = fault;
 
     return _object;
@@ -10185,4 +10228,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETSTACKEDIMFILE_TABLE_NAME, md);
@@ -10198,5 +10246,5 @@
 }
 
-bool detStackedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev)
+bool detStackedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -10238,4 +10286,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "bg_mean_stdev", PS_DATA_F64, NULL, bg_mean_stdev)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item bg_mean_stdev");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -10264,5 +10317,5 @@
 bool detStackedImfileInsertObject(psDB *dbh, detStackedImfileRow *object)
 {
-    return detStackedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev);
+    return detStackedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->fault);
 }
 
@@ -10377,4 +10430,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -10426,6 +10484,11 @@
         return false;
     }
-
-    return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detStackedImfileRowAlloc(det_id, iteration, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, fault);
 }
 psArray *detStackedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -10539,5 +10602,5 @@
 static void detNormalizedStatImfileRowFree(detNormalizedStatImfileRow *object);
 
-detNormalizedStatImfileRow *detNormalizedStatImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, psF32 norm)
+detNormalizedStatImfileRow *detNormalizedStatImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault)
 {
     detNormalizedStatImfileRow *_object;
@@ -10550,4 +10613,5 @@
     _object->class_id = psStringCopy(class_id);
     _object->norm = norm;
+    _object->fault = fault;
 
     return _object;
@@ -10582,4 +10646,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETNORMALIZEDSTATIMFILE_TABLE_NAME, md);
@@ -10595,5 +10664,5 @@
 }
 
-bool detNormalizedStatImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, psF32 norm)
+bool detNormalizedStatImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, psF32 norm, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -10615,4 +10684,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "norm", PS_DATA_F32, NULL, norm)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item norm");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -10641,5 +10715,5 @@
 bool detNormalizedStatImfileInsertObject(psDB *dbh, detNormalizedStatImfileRow *object)
 {
-    return detNormalizedStatImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->norm);
+    return detNormalizedStatImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->norm, object->fault);
 }
 
@@ -10734,4 +10808,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -10763,6 +10842,11 @@
         return false;
     }
-
-    return detNormalizedStatImfileRowAlloc(det_id, iteration, class_id, norm);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detNormalizedStatImfileRowAlloc(det_id, iteration, class_id, norm, fault);
 }
 psArray *detNormalizedStatImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -10876,5 +10960,5 @@
 static void detNormalizedImfileRowFree(detNormalizedImfileRow *object);
 
-detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     detNormalizedImfileRow *_object;
@@ -10892,4 +10976,5 @@
     _object->b1_uri = psStringCopy(b1_uri);
     _object->b2_uri = psStringCopy(b2_uri);
+    _object->fault = fault;
 
     return _object;
@@ -10952,4 +11037,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETNORMALIZEDIMFILE_TABLE_NAME, md);
@@ -10965,5 +11055,5 @@
 }
 
-bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -11010,4 +11100,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -11036,5 +11131,5 @@
 bool detNormalizedImfileInsertObject(psDB *dbh, detNormalizedImfileRow *object)
 {
-    return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri);
+    return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri, object->fault);
 }
 
@@ -11154,4 +11249,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -11208,6 +11308,11 @@
         return false;
     }
-
-    return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);
 }
 psArray *detNormalizedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -11321,5 +11426,5 @@
 static void detNormalizedExpRowFree(detNormalizedExpRow *object);
 
-detNormalizedExpRow *detNormalizedExpRowAlloc(psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+detNormalizedExpRow *detNormalizedExpRowAlloc(psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     detNormalizedExpRow *_object;
@@ -11336,4 +11441,5 @@
     _object->b1_uri = psStringCopy(b1_uri);
     _object->b2_uri = psStringCopy(b2_uri);
+    _object->fault = fault;
 
     return _object;
@@ -11390,4 +11496,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETNORMALIZEDEXP_TABLE_NAME, md);
@@ -11403,5 +11514,5 @@
 }
 
-bool detNormalizedExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+bool detNormalizedExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -11443,4 +11554,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -11469,5 +11585,5 @@
 bool detNormalizedExpInsertObject(psDB *dbh, detNormalizedExpRow *object)
 {
-    return detNormalizedExpInsert(dbh, object->det_id, object->iteration, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri);
+    return detNormalizedExpInsert(dbh, object->det_id, object->iteration, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri, object->fault);
 }
 
@@ -11582,4 +11698,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -11631,6 +11752,11 @@
         return false;
     }
-
-    return detNormalizedExpRowAlloc(det_id, iteration, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detNormalizedExpRowAlloc(det_id, iteration, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);
 }
 psArray *detNormalizedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -11744,5 +11870,5 @@
 static void detResidImfileRowFree(detResidImfileRow *object);
 
-detResidImfileRow *detResidImfileRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+detResidImfileRow *detResidImfileRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     detResidImfileRow *_object;
@@ -11762,4 +11888,5 @@
     _object->b1_uri = psStringCopy(b1_uri);
     _object->b2_uri = psStringCopy(b2_uri);
+    _object->fault = fault;
 
     return _object;
@@ -11834,4 +11961,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETRESIDIMFILE_TABLE_NAME, md);
@@ -11847,5 +11979,5 @@
 }
 
-bool detResidImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri)
+bool detResidImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -11902,4 +12034,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -11928,5 +12065,5 @@
 bool detResidImfileInsertObject(psDB *dbh, detResidImfileRow *object)
 {
-    return detResidImfileInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri);
+    return detResidImfileInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri, object->fault);
 }
 
@@ -12056,4 +12193,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -12120,6 +12262,11 @@
         return false;
     }
-
-    return detResidImfileRowAlloc(det_id, iteration, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detResidImfileRowAlloc(det_id, iteration, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);
 }
 psArray *detResidImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -12233,5 +12380,5 @@
 static void detResidExpRowFree(detResidExpRow *object);
 
-detResidExpRow *detResidExpRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, bool accept)
+detResidExpRow *detResidExpRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, bool accept, psS16 fault)
 {
     detResidExpRow  *_object;
@@ -12250,4 +12397,5 @@
     _object->b2_uri = psStringCopy(b2_uri);
     _object->accept = accept;
+    _object->fault = fault;
 
     return _object;
@@ -12315,4 +12463,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETRESIDEXP_TABLE_NAME, md);
@@ -12328,5 +12481,5 @@
 }
 
-bool detResidExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, bool accept)
+bool detResidExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *b1_uri, const char *b2_uri, bool accept, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -12378,4 +12531,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "accept", PS_DATA_BOOL, NULL, accept)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item accept");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -12404,5 +12562,5 @@
 bool detResidExpInsertObject(psDB *dbh, detResidExpRow *object)
 {
-    return detResidExpInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri, object->accept);
+    return detResidExpInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->b1_uri, object->b2_uri, object->accept, object->fault);
 }
 
@@ -12527,4 +12685,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -12586,6 +12749,11 @@
         return false;
     }
-
-    return detResidExpRowAlloc(det_id, iteration, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, accept);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detResidExpRowAlloc(det_id, iteration, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, accept, fault);
 }
 psArray *detResidExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -12699,5 +12867,5 @@
 static void detRunSummaryRowFree(detRunSummaryRow *object);
 
-detRunSummaryRow *detRunSummaryRowAlloc(psS32 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept)
+detRunSummaryRow *detRunSummaryRowAlloc(psS32 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)
 {
     detRunSummaryRow *_object;
@@ -12712,4 +12880,5 @@
     _object->bg_mean_stdev = bg_mean_stdev;
     _object->accept = accept;
+    _object->fault = fault;
 
     return _object;
@@ -12753,4 +12922,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, DETRUNSUMMARY_TABLE_NAME, md);
@@ -12766,5 +12940,5 @@
 }
 
-bool detRunSummaryInsert(psDB * dbh, psS32 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept)
+bool detRunSummaryInsert(psDB * dbh, psS32 det_id, psS32 iteration, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, bool accept, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -12796,4 +12970,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "accept", PS_DATA_BOOL, NULL, accept)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item accept");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -12822,5 +13001,5 @@
 bool detRunSummaryInsertObject(psDB *dbh, detRunSummaryRow *object)
 {
-    return detRunSummaryInsert(dbh, object->det_id, object->iteration, object->bg, object->bg_stdev, object->bg_mean_stdev, object->accept);
+    return detRunSummaryInsert(dbh, object->det_id, object->iteration, object->bg, object->bg_stdev, object->bg_mean_stdev, object->accept, object->fault);
 }
 
@@ -12925,4 +13104,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
 
@@ -12964,6 +13148,11 @@
         return false;
     }
-
-    return detRunSummaryRowAlloc(det_id, iteration, bg, bg_stdev, bg_mean_stdev, accept);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return detRunSummaryRowAlloc(det_id, iteration, bg, bg_stdev, bg_mean_stdev, accept, fault);
 }
 psArray *detRunSummarySelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Index: /trunk/ippdb/src/ippdb.h
===================================================================
--- /trunk/ippdb/src/ippdb.h	(revision 11112)
+++ /trunk/ippdb/src/ippdb.h	(revision 11113)
@@ -4842,4 +4842,5 @@
     char            *b1_uri;
     char            *b2_uri;
+    psS16           fault;
 } detProcessedImfileRow;
 
@@ -4859,5 +4860,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -4898,5 +4900,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -5062,4 +5065,5 @@
     char            *b1_uri;
     char            *b2_uri;
+    psS16           fault;
 } detProcessedExpRow;
 
@@ -5077,5 +5081,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -5114,5 +5119,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -5278,4 +5284,5 @@
     psF64           bg_stdev;
     psF64           bg_mean_stdev;
+    psS16           fault;
 } detStackedImfileRow;
 
@@ -5293,5 +5300,6 @@
     psF64           bg,
     psF64           bg_stdev,
-    psF64           bg_mean_stdev
+    psF64           bg_mean_stdev,
+    psS16           fault
 );
 
@@ -5330,5 +5338,6 @@
     psF64           bg,
     psF64           bg_stdev,
-    psF64           bg_mean_stdev
+    psF64           bg_mean_stdev,
+    psS16           fault
 );
 
@@ -5490,4 +5499,5 @@
     char            *class_id;
     psF32           norm;
+    psS16           fault;
 } detNormalizedStatImfileRow;
 
@@ -5501,5 +5511,6 @@
     psS32           iteration,
     const char      *class_id,
-    psF32           norm
+    psF32           norm,
+    psS16           fault
 );
 
@@ -5534,5 +5545,6 @@
     psS32           iteration,
     const char      *class_id,
-    psF32           norm
+    psF32           norm,
+    psS16           fault
 );
 
@@ -5699,4 +5711,5 @@
     char            *b1_uri;
     char            *b2_uri;
+    psS16           fault;
 } detNormalizedImfileRow;
 
@@ -5715,5 +5728,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -5753,5 +5767,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -5917,4 +5932,5 @@
     char            *b1_uri;
     char            *b2_uri;
+    psS16           fault;
 } detNormalizedExpRow;
 
@@ -5932,5 +5948,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -5969,5 +5986,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -6136,4 +6154,5 @@
     char            *b1_uri;
     char            *b2_uri;
+    psS16           fault;
 } detResidImfileRow;
 
@@ -6154,5 +6173,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -6194,5 +6214,6 @@
     psF64           bg_mean_stdev,
     const char      *b1_uri,
-    const char      *b2_uri
+    const char      *b2_uri,
+    psS16           fault
 );
 
@@ -6360,4 +6381,5 @@
     char            *b2_uri;
     bool            accept;
+    psS16           fault;
 } detResidExpRow;
 
@@ -6377,5 +6399,6 @@
     const char      *b1_uri,
     const char      *b2_uri,
-    bool            accept
+    bool            accept,
+    psS16           fault
 );
 
@@ -6416,5 +6439,6 @@
     const char      *b1_uri,
     const char      *b2_uri,
-    bool            accept
+    bool            accept,
+    psS16           fault
 );
 
@@ -6578,4 +6602,5 @@
     psF64           bg_mean_stdev;
     bool            accept;
+    psS16           fault;
 } detRunSummaryRow;
 
@@ -6591,5 +6616,6 @@
     psF64           bg_stdev,
     psF64           bg_mean_stdev,
-    bool            accept
+    bool            accept,
+    psS16           fault
 );
 
@@ -6626,5 +6652,6 @@
     psF64           bg_stdev,
     psF64           bg_mean_stdev,
-    bool            accept
+    bool            accept,
+    psS16           fault
 );
 
Index: /trunk/ippdb/tests/alloc.c
===================================================================
--- /trunk/ippdb/tests/alloc.c	(revision 11112)
+++ /trunk/ippdb/tests/alloc.c	(revision 11113)
@@ -921,5 +921,5 @@
         detProcessedImfileRow *object;
 
-        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
+        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16    );
 
         if (!object) {
@@ -967,4 +967,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -974,5 +977,5 @@
         detProcessedExpRow *object;
 
-        object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
+        object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16    );
 
         if (!object) {
@@ -1012,4 +1015,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1019,5 +1025,5 @@
         detStackedImfileRow *object;
 
-        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64    );
+        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, -16    );
 
         if (!object) {
@@ -1057,4 +1063,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1064,5 +1073,5 @@
         detNormalizedStatImfileRow *object;
 
-        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32    );
+        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32, -16    );
 
         if (!object) {
@@ -1086,4 +1095,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1093,5 +1105,5 @@
         detNormalizedImfileRow *object;
 
-        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
+        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16    );
 
         if (!object) {
@@ -1135,4 +1147,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1142,5 +1157,5 @@
         detNormalizedExpRow *object;
 
-        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
+        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string", -16    );
 
         if (!object) {
@@ -1180,4 +1195,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1187,5 +1205,5 @@
         detResidImfileRow *object;
 
-        object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string"    );
+        object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16    );
 
         if (!object) {
@@ -1237,4 +1255,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1244,5 +1265,5 @@
         detResidExpRow  *object;
 
-        object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true    );
+        object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true, -16    );
 
         if (!object) {
@@ -1290,4 +1311,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1297,5 +1321,5 @@
         detRunSummaryRow *object;
 
-        object = detRunSummaryRowAlloc(-32, -32, 64.64, 64.64, 64.64, true    );
+        object = detRunSummaryRowAlloc(-32, -32, 64.64, 64.64, 64.64, true, -16    );
 
         if (!object) {
@@ -1324,4 +1348,7 @@
         }
         if (!object->accept == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/insert.c
===================================================================
--- /trunk/ippdb/tests/insert.c	(revision 11112)
+++ /trunk/ippdb/tests/insert.c	(revision 11113)
@@ -343,125 +343,125 @@
         }
 
-        if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detProcessedExpInsert(dbh, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detStackedImfileInsert(dbh, -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detNormalizedStatImfileInsert(dbh, -32, -32, "a string", 32.32)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detNormalizedImfileInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detNormalizedExpInsert(dbh, -32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detResidImfileInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detResidExpInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!detRunSummaryInsert(dbh, -32, -32, 64.64, 64.64, 64.64, true)) {
+        if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detProcessedExpInsert(dbh, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detStackedImfileInsert(dbh, -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedStatImfileInsert(dbh, -32, -32, "a string", 32.32, -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedImfileInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detNormalizedExpInsert(dbh, -32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detResidImfileInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detResidExpInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true, -16)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!detRunSummaryInsert(dbh, -32, -32, 64.64, 64.64, 64.64, true, -16)) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/insertobject.c
===================================================================
--- /trunk/ippdb/tests/insertobject.c	(revision 11112)
+++ /trunk/ippdb/tests/insertobject.c	(revision 11113)
@@ -498,5 +498,5 @@
         }
 
-        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -520,5 +520,5 @@
         }
 
-        object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -542,5 +542,5 @@
         }
 
-        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64);
+        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -564,5 +564,5 @@
         }
 
-        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32);
+        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -586,5 +586,5 @@
         }
 
-        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -608,5 +608,5 @@
         }
 
-        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -630,5 +630,5 @@
         }
 
-        object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -652,5 +652,5 @@
         }
 
-        object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true);
+        object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -674,5 +674,5 @@
         }
 
-        object = detRunSummaryRowAlloc(-32, -32, 64.64, 64.64, 64.64, true);
+        object = detRunSummaryRowAlloc(-32, -32, 64.64, 64.64, 64.64, true, -16);
         if (!object) {
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- /trunk/ippdb/tests/metadatafromobject.c	(revision 11112)
+++ /trunk/ippdb/tests/metadatafromobject.c	(revision 11113)
@@ -1099,5 +1099,5 @@
         bool            status;
 
-        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1151,4 +1151,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1160,5 +1163,5 @@
         bool            status;
 
-        object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1204,4 +1207,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1213,5 +1219,5 @@
         bool            status;
 
-        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64);
+        object = detStackedImfileRowAlloc(-32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1257,4 +1263,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1266,5 +1275,5 @@
         bool            status;
 
-        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32);
+        object = detNormalizedStatImfileRowAlloc(-32, -32, "a string", 32.32, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1294,4 +1303,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1303,5 +1315,5 @@
         bool            status;
 
-        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1351,4 +1363,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1360,5 +1375,5 @@
         bool            status;
 
-        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1404,4 +1419,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1413,5 +1431,5 @@
         bool            status;
 
-        object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string");
+        object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1469,4 +1487,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1478,5 +1499,5 @@
         bool            status;
 
-        object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true);
+        object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string", true, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1530,4 +1551,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -1539,5 +1563,5 @@
         bool            status;
 
-        object = detRunSummaryRowAlloc(-32, -32, 64.64, 64.64, 64.64, true);
+        object = detRunSummaryRowAlloc(-32, -32, 64.64, 64.64, 64.64, true, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1572,4 +1596,7 @@
         }
         if (!psMetadataLookupBool(&status, md, "accept") == true) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- /trunk/ippdb/tests/objectfrommetadata.c	(revision 11112)
+++ /trunk/ippdb/tests/objectfrommetadata.c	(revision 11113)
@@ -1697,4 +1697,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detProcessedImfileObjectFromMetadata(md);
@@ -1746,4 +1749,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1787,4 +1793,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detProcessedExpObjectFromMetadata(md);
@@ -1828,4 +1837,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1869,4 +1881,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detStackedImfileObjectFromMetadata(md);
@@ -1910,4 +1925,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1935,4 +1953,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detNormalizedStatImfileObjectFromMetadata(md);
@@ -1960,4 +1981,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2005,4 +2029,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detNormalizedImfileObjectFromMetadata(md);
@@ -2050,4 +2077,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2091,4 +2121,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detNormalizedExpObjectFromMetadata(md);
@@ -2132,4 +2165,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2185,4 +2221,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detResidImfileObjectFromMetadata(md);
@@ -2238,4 +2277,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2287,4 +2329,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detResidExpObjectFromMetadata(md);
@@ -2336,4 +2381,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2369,4 +2417,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = detRunSummaryObjectFromMetadata(md);
@@ -2399,4 +2450,7 @@
         }
         if (!object->accept == true) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
