Index: trunk/ippdb/Makefile.am
===================================================================
--- trunk/ippdb/Makefile.am	(revision 18044)
+++ trunk/ippdb/Makefile.am	(revision 18595)
@@ -58,5 +58,4 @@
     $(top_builddir)/docs/man/man3/magicNodeResultRow.3 \
     $(top_builddir)/docs/man/man3/magicMaskRow.3 \
-    $(top_builddir)/docs/man/man3/magicSkyfileMaskRow.3 \
     $(top_builddir)/docs/man/man3/calDBRow.3 \
     $(top_builddir)/docs/man/man3/calRunRow.3 \
@@ -68,5 +67,5 @@
 
 
-docs/man/man3/ippdb.3 docs/man/man3/pzDataStoreRow.3 docs/man/man3/summitExpRow.3 docs/man/man3/summitImfileRow.3 docs/man/man3/pzDownloadExpRow.3 docs/man/man3/pzDownloadImfileRow.3 docs/man/man3/newExpRow.3 docs/man/man3/newImfileRow.3 docs/man/man3/rawExpRow.3 docs/man/man3/rawImfileRow.3 docs/man/man3/guidePendingExpRow.3 docs/man/man3/chipRunRow.3 docs/man/man3/chipProcessedImfileRow.3 docs/man/man3/chipMaskRow.3 docs/man/man3/camRunRow.3 docs/man/man3/camProcessedExpRow.3 docs/man/man3/camMaskRow.3 docs/man/man3/fakeRunRow.3 docs/man/man3/fakeProcessedImfileRow.3 docs/man/man3/fakeMaskRow.3 docs/man/man3/warpRunRow.3 docs/man/man3/warpSkyCellMapRow.3 docs/man/man3/warpSkyfileRow.3 docs/man/man3/warpMaskRow.3 docs/man/man3/diffRunRow.3 docs/man/man3/diffInputSkyfileRow.3 docs/man/man3/diffSkyfileRow.3 docs/man/man3/stackRunRow.3 docs/man/man3/stackInputSkyfileRow.3 docs/man/man3/stackSumSkyfileRow.3 docs/man/man3/detRunRow.3 docs/man/man3/detInputExpRow.3 docs/man/man3/detProcessedImfileRow.3 docs/man/man3/detProcessedExpRow.3 docs/man/man3/detStackedImfileRow.3 docs/man/man3/detNormalizedStatImfileRow.3 docs/man/man3/detNormalizedImfileRow.3 docs/man/man3/detNormalizedExpRow.3 docs/man/man3/detResidImfileRow.3 docs/man/man3/detResidExpRow.3 docs/man/man3/detRunSummaryRow.3 docs/man/man3/detRegisteredImfileRow.3 docs/man/man3/detCorrectedExpRow.3 docs/man/man3/detCorrectedImfileRow.3 docs/man/man3/magicRunRow.3 docs/man/man3/magicInputSkyfileRow.3 docs/man/man3/magicTreeRow.3 docs/man/man3/magicNodeResultRow.3 docs/man/man3/magicMaskRow.3 docs/man/man3/magicSkyfileMaskRow.3 docs/man/man3/calDBRow.3 docs/man/man3/calRunRow.3 docs/man/man3/flatcorrRunRow.3 docs/man/man3/flatcorrExpRow.3 docs/man/man3/pstampDataStoreRow.3 docs/man/man3/pstampRequestRow.3 docs/man/man3/pstampJobRow.3:
+docs/man/man3/ippdb.3 docs/man/man3/pzDataStoreRow.3 docs/man/man3/summitExpRow.3 docs/man/man3/summitImfileRow.3 docs/man/man3/pzDownloadExpRow.3 docs/man/man3/pzDownloadImfileRow.3 docs/man/man3/newExpRow.3 docs/man/man3/newImfileRow.3 docs/man/man3/rawExpRow.3 docs/man/man3/rawImfileRow.3 docs/man/man3/guidePendingExpRow.3 docs/man/man3/chipRunRow.3 docs/man/man3/chipProcessedImfileRow.3 docs/man/man3/chipMaskRow.3 docs/man/man3/camRunRow.3 docs/man/man3/camProcessedExpRow.3 docs/man/man3/camMaskRow.3 docs/man/man3/fakeRunRow.3 docs/man/man3/fakeProcessedImfileRow.3 docs/man/man3/fakeMaskRow.3 docs/man/man3/warpRunRow.3 docs/man/man3/warpSkyCellMapRow.3 docs/man/man3/warpSkyfileRow.3 docs/man/man3/warpMaskRow.3 docs/man/man3/diffRunRow.3 docs/man/man3/diffInputSkyfileRow.3 docs/man/man3/diffSkyfileRow.3 docs/man/man3/stackRunRow.3 docs/man/man3/stackInputSkyfileRow.3 docs/man/man3/stackSumSkyfileRow.3 docs/man/man3/detRunRow.3 docs/man/man3/detInputExpRow.3 docs/man/man3/detProcessedImfileRow.3 docs/man/man3/detProcessedExpRow.3 docs/man/man3/detStackedImfileRow.3 docs/man/man3/detNormalizedStatImfileRow.3 docs/man/man3/detNormalizedImfileRow.3 docs/man/man3/detNormalizedExpRow.3 docs/man/man3/detResidImfileRow.3 docs/man/man3/detResidExpRow.3 docs/man/man3/detRunSummaryRow.3 docs/man/man3/detRegisteredImfileRow.3 docs/man/man3/detCorrectedExpRow.3 docs/man/man3/detCorrectedImfileRow.3 docs/man/man3/magicRunRow.3 docs/man/man3/magicInputSkyfileRow.3 docs/man/man3/magicTreeRow.3 docs/man/man3/magicNodeResultRow.3 docs/man/man3/magicMaskRow.3 docs/man/man3/calDBRow.3 docs/man/man3/calRunRow.3 docs/man/man3/flatcorrRunRow.3 docs/man/man3/flatcorrExpRow.3 docs/man/man3/pstampDataStoreRow.3 docs/man/man3/pstampRequestRow.3 docs/man/man3/pstampJobRow.3:
 	$(DOXYGEN)
 
Index: trunk/ippdb/src/ippdb.c
===================================================================
--- trunk/ippdb/src/ippdb.c	(revision 18044)
+++ trunk/ippdb/src/ippdb.c	(revision 18595)
@@ -79,5 +79,4 @@
 #define MAGICNODERESULT_TABLE_NAME "magicNodeResult"
 #define MAGICMASK_TABLE_NAME "magicMask"
-#define MAGICSKYFILEMASK_TABLE_NAME "magicSkyfileMask"
 #define CALDB_TABLE_NAME "calDB"
 #define CALRUN_TABLE_NAME "calRun"
@@ -14075,5 +14074,5 @@
 static void stackRunRowFree(stackRunRow *object);
 
-stackRunRow *stackRunRowAlloc(psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)
+stackRunRow *stackRunRowAlloc(psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id, const char *filter)
 {
     stackRunRow     *_object;
@@ -14089,4 +14088,5 @@
     _object->skycell_id = psStringCopy(skycell_id);
     _object->tess_id = psStringCopy(tess_id);
+    _object->filter = psStringCopy(filter);
 
     return _object;
@@ -14101,4 +14101,5 @@
     psFree(object->skycell_id);
     psFree(object->tess_id);
+    psFree(object->filter);
 }
 
@@ -14141,4 +14142,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item filter");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, STACKRUN_TABLE_NAME, md);
@@ -14154,5 +14160,5 @@
 }
 
-bool stackRunInsert(psDB * dbh, psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id)
+bool stackRunInsert(psDB * dbh, psS64 stack_id, const char *state, const char *workdir, const char *dvodb, psTime* registered, const char *skycell_id, const char *tess_id, const char *filter)
 {
     psMetadata *md = psMetadataAlloc();
@@ -14189,4 +14195,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, tess_id)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, filter)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item filter");
         psFree(md);
         return false;
@@ -14215,5 +14226,5 @@
 bool stackRunInsertObject(psDB *dbh, stackRunRow *object)
 {
-    return stackRunInsert(dbh, object->stack_id, object->state, object->workdir, object->dvodb, object->registered, object->skycell_id, object->tess_id);
+    return stackRunInsert(dbh, object->stack_id, object->state, object->workdir, object->dvodb, object->registered, object->skycell_id, object->tess_id, object->filter);
 }
 
@@ -14323,4 +14334,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, object->filter)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item filter");
+        psFree(md);
+        return false;
+    }
 
 
@@ -14367,6 +14383,11 @@
         return false;
     }
-
-    return stackRunRowAlloc(stack_id, state, workdir, dvodb, registered, skycell_id, tess_id);
+    char* filter = psMetadataLookupPtr(&status, md, "filter");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item filter");
+        return false;
+    }
+
+    return stackRunRowAlloc(stack_id, state, workdir, dvodb, registered, skycell_id, tess_id, filter);
 }
 psArray *stackRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -23032,5 +23053,5 @@
 static void magicRunRowFree(magicRunRow *object);
 
-magicRunRow *magicRunRowAlloc(psS64 magic_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered)
+magicRunRow *magicRunRowAlloc(psS64 magic_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered, psS16 fault)
 {
     magicRunRow     *_object;
@@ -23046,4 +23067,5 @@
     _object->dvodb = psStringCopy(dvodb);
     _object->registered = psTimeCopy(registered);
+    _object->fault = fault;
 
     return _object;
@@ -23098,4 +23120,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, MAGICRUN_TABLE_NAME, md);
@@ -23111,5 +23138,5 @@
 }
 
-bool magicRunInsert(psDB * dbh, psS64 magic_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered)
+bool magicRunInsert(psDB * dbh, psS64 magic_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, psTime* registered, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -23146,4 +23173,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, registered)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item registered");
+        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;
@@ -23172,5 +23204,5 @@
 bool magicRunInsertObject(psDB *dbh, magicRunRow *object)
 {
-    return magicRunInsert(dbh, object->magic_id, object->state, object->workdir, object->workdir_state, object->label, object->dvodb, object->registered);
+    return magicRunInsert(dbh, object->magic_id, object->state, object->workdir, object->workdir_state, object->label, object->dvodb, object->registered, object->fault);
 }
 
@@ -23280,4 +23312,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;
+    }
 
 
@@ -23324,6 +23361,11 @@
         return false;
     }
-
-    return magicRunRowAlloc(magic_id, state, workdir, workdir_state, label, dvodb, registered);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return magicRunRowAlloc(magic_id, state, workdir, workdir_state, label, dvodb, registered, fault);
 }
 psArray *magicRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -24088,5 +24130,5 @@
 static void magicNodeResultRowFree(magicNodeResultRow *object);
 
-magicNodeResultRow *magicNodeResultRowAlloc(psS64 magic_id, const char *node, const char *uri)
+magicNodeResultRow *magicNodeResultRowAlloc(psS64 magic_id, const char *node, const char *uri, psS16 fault)
 {
     magicNodeResultRow *_object;
@@ -24098,4 +24140,5 @@
     _object->node = psStringCopy(node);
     _object->uri = psStringCopy(uri);
+    _object->fault = fault;
 
     return _object;
@@ -24126,4 +24169,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, MAGICNODERESULT_TABLE_NAME, md);
@@ -24139,5 +24187,5 @@
 }
 
-bool magicNodeResultInsert(psDB * dbh, psS64 magic_id, const char *node, const char *uri)
+bool magicNodeResultInsert(psDB * dbh, psS64 magic_id, const char *node, const char *uri, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -24154,4 +24202,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item 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;
@@ -24180,5 +24233,5 @@
 bool magicNodeResultInsertObject(psDB *dbh, magicNodeResultRow *object)
 {
-    return magicNodeResultInsert(dbh, object->magic_id, object->node, object->uri);
+    return magicNodeResultInsert(dbh, object->magic_id, object->node, object->uri, object->fault);
 }
 
@@ -24268,4 +24321,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;
+    }
 
 
@@ -24292,6 +24350,11 @@
         return false;
     }
-
-    return magicNodeResultRowAlloc(magic_id, node, uri);
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return magicNodeResultRowAlloc(magic_id, node, uri, fault);
 }
 psArray *magicNodeResultSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -24411,5 +24474,5 @@
 static void magicMaskRowFree(magicMaskRow *object);
 
-magicMaskRow *magicMaskRowAlloc(psS64 magic_id, const char *uri)
+magicMaskRow *magicMaskRowAlloc(psS64 magic_id, const char *uri, psS32 streaks, psS16 fault)
 {
     magicMaskRow    *_object;
@@ -24420,4 +24483,6 @@
     _object->magic_id = magic_id;
     _object->uri = psStringCopy(uri);
+    _object->streaks = streaks;
+    _object->fault = fault;
 
     return _object;
@@ -24442,4 +24507,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "streaks", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item streaks");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key", 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, MAGICMASK_TABLE_NAME, md);
@@ -24455,5 +24530,5 @@
 }
 
-bool magicMaskInsert(psDB * dbh, psS64 magic_id, const char *uri)
+bool magicMaskInsert(psDB * dbh, psS64 magic_id, const char *uri, psS32 streaks, psS16 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -24465,4 +24540,14 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "streaks", PS_DATA_S32, NULL, streaks)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item streaks");
+        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;
@@ -24491,5 +24576,5 @@
 bool magicMaskInsertObject(psDB *dbh, magicMaskRow *object)
 {
-    return magicMaskInsert(dbh, object->magic_id, object->uri);
+    return magicMaskInsert(dbh, object->magic_id, object->uri, object->streaks, object->fault);
 }
 
@@ -24574,4 +24659,14 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "streaks", PS_DATA_S32, NULL, object->streaks)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item streaks");
+        psFree(md);
+        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;
+    }
 
 
@@ -24593,6 +24688,16 @@
         return false;
     }
-
-    return magicMaskRowAlloc(magic_id, uri);
+    psS32 streaks = psMetadataLookupS32(&status, md, "streaks");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item streaks");
+        return false;
+    }
+    psS16 fault = psMetadataLookupS16(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return magicMaskRowAlloc(magic_id, uri, streaks, fault);
 }
 psArray *magicMaskSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -24710,326 +24815,4 @@
     return true;
 }
-static void magicSkyfileMaskRowFree(magicSkyfileMaskRow *object);
-
-magicSkyfileMaskRow *magicSkyfileMaskRowAlloc(psS64 magic_id, psS64 diff_id, const char *uri)
-{
-    magicSkyfileMaskRow *_object;
-
-    _object = psAlloc(sizeof(magicSkyfileMaskRow));
-    psMemSetDeallocator(_object, (psFreeFunc)magicSkyfileMaskRowFree);
-
-    _object->magic_id = magic_id;
-    _object->diff_id = diff_id;
-    _object->uri = psStringCopy(uri);
-
-    return _object;
-}
-
-static void magicSkyfileMaskRowFree(magicSkyfileMaskRow *object)
-{
-    psFree(object->uri);
-}
-
-bool magicSkyfileMaskCreateTable(psDB *dbh)
-{
-    psMetadata *md = psMetadataAlloc();
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "magic_id", PS_DATA_S64, "Primary Key fkey(magic_id) ref magicRun(magic_id)", 0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item magic_id");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, "Primary Key fkey(magic_id, diff_id) ref magicInputSkyfile(magic_id, diff_id)", 0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, "fkey(magic_id) ref magicMask(magic_id)", "255")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
-        psFree(md);
-        return false;
-    }
-
-    bool status = psDBCreateTable(dbh, MAGICSKYFILEMASK_TABLE_NAME, md);
-
-    psFree(md);
-
-    return status;
-}
-
-bool magicSkyfileMaskDropTable(psDB *dbh)
-{
-    return psDBDropTable(dbh, MAGICSKYFILEMASK_TABLE_NAME);
-}
-
-bool magicSkyfileMaskInsert(psDB * dbh, psS64 magic_id, psS64 diff_id, const char *uri)
-{
-    psMetadata *md = psMetadataAlloc();
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "magic_id", PS_DATA_S64, NULL, magic_id)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item magic_id");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, diff_id)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
-        psFree(md);
-        return false;
-    }
-
-    bool status = psDBInsertOneRow(dbh, MAGICSKYFILEMASK_TABLE_NAME, md);
-    psFree(md);
-
-    return status;
-}
-
-long long magicSkyfileMaskDelete(psDB *dbh, const psMetadata *where, unsigned long long limit)
-{
-    long long       deleted = 0;
-
-    long long count = psDBDeleteRows(dbh, MAGICSKYFILEMASK_TABLE_NAME, where, limit);
-    if (count < 0) {
-        psError(PS_ERR_UNKNOWN, true, "failed to delete row from magicSkyfileMask");
-        return count;
-
-        deleted += count;
-    }
-
-    return deleted;
-}
-bool magicSkyfileMaskInsertObject(psDB *dbh, magicSkyfileMaskRow *object)
-{
-    return magicSkyfileMaskInsert(dbh, object->magic_id, object->diff_id, object->uri);
-}
-
-bool magicSkyfileMaskInsertObjects(psDB *dbh, psArray *objects)
-{
-    for (long i = 0; i < psArrayLength(objects); i++) {
-        if (!magicSkyfileMaskInsertObject(dbh, objects->data[i])) {
-            return false;
-        }
-    }
-
-    return true;
-}
-
-bool magicSkyfileMaskInsertFits(psDB *dbh, const psFits *fits)
-{
-    psArray         *rowSet;
-
-    // move to (the first?) extension named  MAGICSKYFILEMASK_TABLE_NAME
-    if (!psFitsMoveExtName(fits, MAGICSKYFILEMASK_TABLE_NAME)) {
-        psError(PS_ERR_UNKNOWN, true, "failed to find FITS extension %s", MAGICSKYFILEMASK_TABLE_NAME);
-        return false;
-    }
-
-    // check HDU type
-    if (psFitsGetExtType(fits) != PS_FITS_TYPE_BINARY_TABLE)  {
-        psError(PS_ERR_UNKNOWN, true, "FITS HDU type is not PS_FITS_TYPE_BINARY_TABLE");
-        return false;
-    }
-
-    // read fits table
-    rowSet = psFitsReadTable(fits);
-    if (!rowSet) {
-        psError(PS_ERR_UNKNOWN, true, "FITS read error or FITS table is empty");
-        psFree(rowSet);
-        return false;
-    }
-
-    if (!psDBInsertRows(dbh, MAGICSKYFILEMASK_TABLE_NAME, rowSet)) {
-        psError(PS_ERR_UNKNOWN, false, "databse insert failed");
-        psFree(rowSet);
-        return false;
-    }
-
-    psFree(rowSet);
-
-    return true;
-}
-
-bool magicSkyfileMaskSelectRowsFits(psDB *dbh, psFits *fits, const psMetadata *where, unsigned long long limit)
-{
-    psArray         *rowSet;
-
-    rowSet = psDBSelectRows(dbh, MAGICSKYFILEMASK_TABLE_NAME, where, limit);
-    if (!rowSet) {
-        return false;
-    }
-
-    // output to fits
-    if (!psFitsWriteTable(fits, NULL, rowSet, MAGICSKYFILEMASK_TABLE_NAME)) {
-        psError(PS_ERR_UNKNOWN, false, "FITS table write failed");
-        psFree(rowSet);
-        return false;
-    }
-
-    psFree(rowSet);
-
-    return true;
-}
-
-psMetadata *magicSkyfileMaskMetadataFromObject(const magicSkyfileMaskRow *object)
-{
-    psMetadata *md = psMetadataAlloc();
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "magic_id", PS_DATA_S64, NULL, object->magic_id)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item magic_id");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "diff_id", PS_DATA_S64, NULL, object->diff_id)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item diff_id");
-        psFree(md);
-        return false;
-    }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, object->uri)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
-        psFree(md);
-        return false;
-    }
-
-
-    return md;
-}
-
-magicSkyfileMaskRow *magicSkyfileMaskObjectFromMetadata(psMetadata *md)
-{
-
-bool status = false;
-    psS64 magic_id = psMetadataLookupS64(&status, md, "magic_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item magic_id");
-        return false;
-    }
-    psS64 diff_id = psMetadataLookupS64(&status, md, "diff_id");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item diff_id");
-        return false;
-    }
-    char* uri = psMetadataLookupPtr(&status, md, "uri");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item uri");
-        return false;
-    }
-
-    return magicSkyfileMaskRowAlloc(magic_id, diff_id, uri);
-}
-psArray *magicSkyfileMaskSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
-{
-    psArray         *rowSet;
-    psArray         *returnSet;
-    psU64           i;
-
-    rowSet = psDBSelectRows(dbh, MAGICSKYFILEMASK_TABLE_NAME, where, limit);
-    if (!rowSet) {
-        return NULL;
-    }
-
-    // convert psMetadata rows to row objects
-
-    returnSet = psArrayAllocEmpty(rowSet->n);
-
-    for (i = 0; i < rowSet->n; i++) {
-        magicSkyfileMaskRow *object = magicSkyfileMaskObjectFromMetadata(rowSet->data[i]);
-        if (!object) {
-            psFree(object);
-            psFree(returnSet);
-            psError(PS_ERR_UNKNOWN, false, "database error");
-            return NULL;
-        }
-        psArrayAdd(returnSet, 0, object);
-        psFree(object);
-    }
-
-    psFree(rowSet);
-
-    return returnSet;
-}
-bool magicSkyfileMaskDeleteObject(psDB *dbh, const magicSkyfileMaskRow *object)
-{
-    psMetadata *where = magicSkyfileMaskMetadataFromObject(object);
-    long long count = psDBDeleteRows(dbh, MAGICSKYFILEMASK_TABLE_NAME, where, 0);
-    psFree(where);
-    if (count < 0) {
-        psError(PS_ERR_UNKNOWN, true, "failed to delete row from magicSkyfileMask");
-        return false;
-    }
-    if (count > 1) {
-        // XXX should this be a psAbort() instead?  It is possible that
-        // having an object match multiple rows was by design.
-        psError(PS_ERR_UNKNOWN, true, "magicSkyfileMaskRow object matched more then one row.  Check your database schema");
-        return false;
-    }
-
-    return true;
-}
-long long magicSkyfileMaskDeleteRowObjects(psDB *dbh, const psArray *objects, unsigned long long limit)
-{
-    long long       deleted = 0;
-
-    for (long long i = 0; i < objects->n; i++) {
-        magicSkyfileMaskRow *object = objects->data[i];
-        psMetadata *where = magicSkyfileMaskMetadataFromObject(object);
-        long long count = psDBDeleteRows(dbh, MAGICSKYFILEMASK_TABLE_NAME, where, limit);
-        psFree(where);
-        if (count < 0) {
-            psError(PS_ERR_UNKNOWN, true, "failed to delete row from magicSkyfileMask");
-            return count;
-        }
-
-        deleted += count;
-    }
-
-    return deleted;
-}
-bool magicSkyfileMaskPrintObjects(FILE *stream, psArray *objects, bool mdcf)
-{
-    PS_ASSERT_PTR_NON_NULL(objects, false);
-
-    psMetadata *output = psMetadataAlloc();
-    for (long i = 0; i < psArrayLength(objects); i++) {
-        psMetadata *md = magicSkyfileMaskMetadataFromObject(objects->data[i]);
-        if (!psMetadataAddMetadata(
-            output,
-            PS_LIST_TAIL,
-            MAGICSKYFILEMASK_TABLE_NAME,
-            PS_META_DUPLICATE_OK,
-            NULL,
-            md
-        )) {
-            psError(PS_ERR_UNKNOWN, false, "failed to add metadata");
-            psFree(md);
-            psFree(output);
-            return false;
-        }
-        psFree(md);
-    }
-
-    if (!ippdbPrintMetadataRaw(stream, output, mdcf)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
-        psFree(output);
-    }
-    psFree(output);
-
-    return true;
-}
-bool magicSkyfileMaskPrintObject(FILE *stream, magicSkyfileMaskRow *object, bool mdcf)
-{
-    PS_ASSERT_PTR_NON_NULL(object, false);
-
-    psMetadata *md = magicSkyfileMaskMetadataFromObject(object);
-
-    if (!ippdbPrintMetadataRaw(stream, md, mdcf)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
-        psFree(md);
-    }
-
-    psFree(md);
-
-    return true;
-}
 static void calDBRowFree(calDBRow *object);
 
@@ -26477,5 +26260,5 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "outProduct", PS_DATA_STRING, "UNIQUE", "64")) {
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "outProduct", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item outProduct");
         psFree(md);
@@ -26802,5 +26585,5 @@
 static void pstampRequestRowFree(pstampRequestRow *object);
 
-pstampRequestRow *pstampRequestRowAlloc(psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri, psS16 resultsFile)
+pstampRequestRow *pstampRequestRowAlloc(psS64 req_id, psS64 ds_id, const char *state, const char *name, const char *reqType, const char *outProduct, const char *uri, psS32 fault)
 {
     pstampRequestRow *_object;
@@ -26812,7 +26595,9 @@
     _object->ds_id = ds_id;
     _object->state = psStringCopy(state);
-    _object->outFileset = psStringCopy(outFileset);
+    _object->name = psStringCopy(name);
+    _object->reqType = psStringCopy(reqType);
+    _object->outProduct = psStringCopy(outProduct);
     _object->uri = psStringCopy(uri);
-    _object->resultsFile = resultsFile;
+    _object->fault = fault;
 
     return _object;
@@ -26822,5 +26607,7 @@
 {
     psFree(object->state);
-    psFree(object->outFileset);
+    psFree(object->name);
+    psFree(object->reqType);
+    psFree(object->outProduct);
     psFree(object->uri);
 }
@@ -26844,6 +26631,16 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "outFileset", PS_DATA_STRING, "UNIQUE", "64")) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item outFileset");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "name", PS_DATA_STRING, "UNIQUE", "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item name");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reqType", PS_DATA_STRING, NULL, "16")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reqType");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "outProduct", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item outProduct");
         psFree(md);
         return false;
@@ -26854,6 +26651,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "resultsFile", PS_DATA_S16, NULL, 0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item resultsFile");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -26872,5 +26669,5 @@
 }
 
-bool pstampRequestInsert(psDB * dbh, psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri, psS16 resultsFile)
+bool pstampRequestInsert(psDB * dbh, psS64 req_id, psS64 ds_id, const char *state, const char *name, const char *reqType, const char *outProduct, const char *uri, psS32 fault)
 {
     psMetadata *md = psMetadataAlloc();
@@ -26890,6 +26687,16 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "outFileset", PS_DATA_STRING, NULL, outFileset)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item outFileset");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "name", PS_DATA_STRING, NULL, name)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item name");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reqType", PS_DATA_STRING, NULL, reqType)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reqType");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "outProduct", PS_DATA_STRING, NULL, outProduct)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item outProduct");
         psFree(md);
         return false;
@@ -26900,6 +26707,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "resultsFile", PS_DATA_S16, NULL, resultsFile)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item resultsFile");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S32, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -26928,5 +26735,5 @@
 bool pstampRequestInsertObject(psDB *dbh, pstampRequestRow *object)
 {
-    return pstampRequestInsert(dbh, object->req_id, object->ds_id, object->state, object->outFileset, object->uri, object->resultsFile);
+    return pstampRequestInsert(dbh, object->req_id, object->ds_id, object->state, object->name, object->reqType, object->outProduct, object->uri, object->fault);
 }
 
@@ -27016,6 +26823,16 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "outFileset", PS_DATA_STRING, NULL, object->outFileset)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item outFileset");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "name", PS_DATA_STRING, NULL, object->name)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item name");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "reqType", PS_DATA_STRING, NULL, object->reqType)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item reqType");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "outProduct", PS_DATA_STRING, NULL, object->outProduct)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item outProduct");
         psFree(md);
         return false;
@@ -27026,6 +26843,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "resultsFile", PS_DATA_S16, NULL, object->resultsFile)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item resultsFile");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S32, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -27055,7 +26872,17 @@
         return false;
     }
-    char* outFileset = psMetadataLookupPtr(&status, md, "outFileset");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item outFileset");
+    char* name = psMetadataLookupPtr(&status, md, "name");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item name");
+        return false;
+    }
+    char* reqType = psMetadataLookupPtr(&status, md, "reqType");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item reqType");
+        return false;
+    }
+    char* outProduct = psMetadataLookupPtr(&status, md, "outProduct");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item outProduct");
         return false;
     }
@@ -27065,11 +26892,11 @@
         return false;
     }
-    psS16 resultsFile = psMetadataLookupS16(&status, md, "resultsFile");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item resultsFile");
-        return false;
-    }
-
-    return pstampRequestRowAlloc(req_id, ds_id, state, outFileset, uri, resultsFile);
+    psS32 fault = psMetadataLookupS32(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
+        return false;
+    }
+
+    return pstampRequestRowAlloc(req_id, ds_id, state, name, reqType, outProduct, uri, fault);
 }
 psArray *pstampRequestSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -27189,5 +27016,5 @@
 static void pstampJobRowFree(pstampJobRow *object);
 
-pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *state, const char *jobType, psS32 result, const char *uri, const char *outputBase, const char *args)
+pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *rownum, const char *state, const char *jobType, psS32 fault, const char *uri, const char *outputBase, const char *args)
 {
     pstampJobRow    *_object;
@@ -27198,7 +27025,8 @@
     _object->job_id = job_id;
     _object->req_id = req_id;
+    _object->rownum = psStringCopy(rownum);
     _object->state = psStringCopy(state);
     _object->jobType = psStringCopy(jobType);
-    _object->result = result;
+    _object->fault = fault;
     _object->uri = psStringCopy(uri);
     _object->outputBase = psStringCopy(outputBase);
@@ -27210,4 +27038,5 @@
 static void pstampJobRowFree(pstampJobRow *object)
 {
+    psFree(object->rownum);
     psFree(object->state);
     psFree(object->jobType);
@@ -27230,4 +27059,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "rownum", PS_DATA_STRING, NULL, "64")) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item rownum");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item state");
@@ -27240,6 +27074,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "result", PS_DATA_S32, NULL, 0)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item result");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S32, NULL, 0)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -27273,5 +27107,5 @@
 }
 
-bool pstampJobInsert(psDB * dbh, psS64 job_id, psS64 req_id, const char *state, const char *jobType, psS32 result, const char *uri, const char *outputBase, const char *args)
+bool pstampJobInsert(psDB * dbh, psS64 job_id, psS64 req_id, const char *rownum, const char *state, const char *jobType, psS32 fault, const char *uri, const char *outputBase, const char *args)
 {
     psMetadata *md = psMetadataAlloc();
@@ -27286,4 +27120,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "rownum", PS_DATA_STRING, NULL, rownum)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item rownum");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, state)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item state");
@@ -27296,6 +27135,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "result", PS_DATA_S32, NULL, result)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item result");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S32, NULL, fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -27339,5 +27178,5 @@
 bool pstampJobInsertObject(psDB *dbh, pstampJobRow *object)
 {
-    return pstampJobInsert(dbh, object->job_id, object->req_id, object->state, object->jobType, object->result, object->uri, object->outputBase, object->args);
+    return pstampJobInsert(dbh, object->job_id, object->req_id, object->rownum, object->state, object->jobType, object->fault, object->uri, object->outputBase, object->args);
 }
 
@@ -27422,4 +27261,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "rownum", PS_DATA_STRING, NULL, object->rownum)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item rownum");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, object->state)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item state");
@@ -27432,6 +27276,6 @@
         return false;
     }
-    if (!psMetadataAdd(md, PS_LIST_TAIL, "result", PS_DATA_S32, NULL, object->result)) {
-        psError(PS_ERR_UNKNOWN, false, "failed to add item result");
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S32, NULL, object->fault)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
         psFree(md);
         return false;
@@ -27471,4 +27315,9 @@
         return false;
     }
+    char* rownum = psMetadataLookupPtr(&status, md, "rownum");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item rownum");
+        return false;
+    }
     char* state = psMetadataLookupPtr(&status, md, "state");
     if (!status) {
@@ -27481,7 +27330,7 @@
         return false;
     }
-    psS32 result = psMetadataLookupS32(&status, md, "result");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item result");
+    psS32 fault = psMetadataLookupS32(&status, md, "fault");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault");
         return false;
     }
@@ -27502,5 +27351,5 @@
     }
 
-    return pstampJobRowAlloc(job_id, req_id, state, jobType, result, uri, outputBase, args);
+    return pstampJobRowAlloc(job_id, req_id, rownum, state, jobType, fault, uri, outputBase, args);
 }
 psArray *pstampJobSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Index: trunk/ippdb/src/ippdb.h
===================================================================
--- trunk/ippdb/src/ippdb.h	(revision 18044)
+++ trunk/ippdb/src/ippdb.h	(revision 18595)
@@ -6123,4 +6123,5 @@
     char            *skycell_id;
     char            *tess_id;
+    char            *filter;
 } stackRunRow;
 
@@ -6137,5 +6138,6 @@
     psTime*         registered,
     const char      *skycell_id,
-    const char      *tess_id
+    const char      *tess_id,
+    const char      *filter
 );
 
@@ -6173,5 +6175,6 @@
     psTime*         registered,
     const char      *skycell_id,
-    const char      *tess_id
+    const char      *tess_id,
+    const char      *filter
 );
 
@@ -10032,4 +10035,5 @@
     char            *dvodb;
     psTime*         registered;
+    psS16           fault;
 } magicRunRow;
 
@@ -10046,5 +10050,6 @@
     const char      *label,
     const char      *dvodb,
-    psTime*         registered
+    psTime*         registered,
+    psS16           fault
 );
 
@@ -10082,5 +10087,6 @@
     const char      *label,
     const char      *dvodb,
-    psTime*         registered
+    psTime*         registered,
+    psS16           fault
 );
 
@@ -10643,4 +10649,5 @@
     char            *node;
     char            *uri;
+    psS16           fault;
 } magicNodeResultRow;
 
@@ -10653,5 +10660,6 @@
     psS64           magic_id,
     const char      *node,
-    const char      *uri
+    const char      *uri,
+    psS16           fault
 );
 
@@ -10685,5 +10693,6 @@
     psS64           magic_id,
     const char      *node,
-    const char      *uri
+    const char      *uri,
+    psS16           fault
 );
 
@@ -10843,4 +10852,6 @@
     psS64           magic_id;
     char            *uri;
+    psS32           streaks;
+    psS16           fault;
 } magicMaskRow;
 
@@ -10852,5 +10863,7 @@
 magicMaskRow *magicMaskRowAlloc(
     psS64           magic_id,
-    const char      *uri
+    const char      *uri,
+    psS32           streaks,
+    psS16           fault
 );
 
@@ -10883,5 +10896,7 @@
     psDB            *dbh,               ///< Database handle
     psS64           magic_id,
-    const char      *uri
+    const char      *uri,
+    psS32           streaks,
+    psS16           fault
 );
 
@@ -11031,205 +11046,4 @@
     FILE            *stream,            ///< a stream
     magicMaskRow *object,    ///< an magicMaskRow object
-    bool            mdcf                ///< format as mdconfig or simple
-);
-/** magicSkyfileMaskRow data structure
- *
- * Structure for representing a single row of magicSkyfileMask table data.
- */
-
-typedef struct {
-    psS64           magic_id;
-    psS64           diff_id;
-    char            *uri;
-} magicSkyfileMaskRow;
-
-/** Creates a new magicSkyfileMaskRow object
- *
- *  @return A new magicSkyfileMaskRow object or NULL on failure.
- */
-
-magicSkyfileMaskRow *magicSkyfileMaskRowAlloc(
-    psS64           magic_id,
-    psS64           diff_id,
-    const char      *uri
-);
-
-/** Creates a new magicSkyfileMask table
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskCreateTable(
-    psDB            *dbh                ///< Database handle
-);
-
-/** Deletes a magicSkyfileMask table
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskDropTable(
-    psDB            *dbh                ///< Database handle
-);
-
-/** Insert a single row into a table
- *
- * This function constructs and inserts a single row based on it's parameters.
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskInsert(
-    psDB            *dbh,               ///< Database handle
-    psS64           magic_id,
-    psS64           diff_id,
-    const char      *uri
-);
-
-/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
- *
- * @return A The number of rows removed or a negative value on error
- */
-
-long long magicSkyfileMaskDelete(
-    psDB            *dbh,               ///< Database handle
-    const psMetadata *where,            ///< Row match criteria
-    unsigned long long limit            ///< Maximum number of elements to delete 
-);
-
-/** Insert a single magicSkyfileMaskRow object into a table
- *
- * This function constructs and inserts a single row based on it's parameters.
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskInsertObject(
-    psDB            *dbh,               ///< Database handle
-    magicSkyfileMaskRow *object             ///< magicSkyfileMaskRow object
-);
-
-/** Insert an array of magicSkyfileMaskRow object into a table
- *
- * This function constructs and inserts multiple rows based on it's parameters.
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskInsertObjects(
-    psDB            *dbh,               ///< Database handle
-    psArray         *objects            ///< array of magicSkyfileMaskRow objects
-);
-
-/** Insert data from a binary FITS table magicSkyfileMaskRow into the database
- *
- * This function expects a psFits object with a FITS table as the first
- * extension.  The table must have at least one row of data in it, that is of
- * the appropriate format (number of columns and their type).  All other
- * extensions are ignored.
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskInsertFits(
-    psDB            *dbh,               ///< Database handle
-    const psFits    *fits               ///< psFits object
-);
-
-/** Selects up to limit from the database and returns them in a binary FITS table
- *
- * This function assumes an empty psFits object and will create a FITS table
- * as the first extension.
- *
- *  See psDBSelectRows() for documentation on the format of where.
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskSelectRowsFits(
-    psDB            *dbh,               ///< Database handle
-    psFits          *fits,              ///< psFits object
-    const psMetadata *where,            ///< Row match criteria
-    unsigned long long limit            ///< Maximum number of elements to return
-);
-
-/** Convert a magicSkyfileMaskRow into an equivalent psMetadata
- *
- * @return A psMetadata pointer or NULL on error
- */
-
-psMetadata *magicSkyfileMaskMetadataFromObject(
-    const magicSkyfileMaskRow *object             ///< fooRow to convert into a psMetadata
-);
-
-/** Convert a psMetadata into an equivalent fooRow
- *
- * @return A magicSkyfileMaskRow pointer or NULL on error
- */
-
-magicSkyfileMaskRow *magicSkyfileMaskObjectFromMetadata(
-    psMetadata      *md                 ///< psMetadata to convert into a fooRow
-);
-/** Selects up to limit rows from the database and returns as magicSkyfileMaskRow objects in a psArray
- *
- *  See psDBSelectRows() for documentation on the format of where.
- *
- * @return A psArray pointer or NULL on error
- */
-
-psArray *magicSkyfileMaskSelectRowObjects(
-    psDB            *dbh,               ///< Database handle
-    const psMetadata *where,            ///< Row match criteria
-    unsigned long long limit            ///< Maximum number of elements to return
-);
-/** Deletes a row from the database coresponding to an magicSkyfileMask
- *
- *  Note that a 'where' search psMetadata is constructed from each object and
- *  used to find rows to delete.
- *
- * @return A The number of rows removed or a negative value on error
- */
-
-bool magicSkyfileMaskDeleteObject(
-    psDB            *dbh,               ///< Database handle
-    const magicSkyfileMaskRow *object    ///< Object to delete
-);
-/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
- *
- *  Note that a 'where' search psMetadata is constructed from each object and
- *  used to find rows to delete.
- *
- * @return A The number of rows removed or a negative value on error
- */
-
-long long magicSkyfileMaskDeleteRowObjects(
-    psDB            *dbh,               ///< Database handle
-    const psArray   *objects,           ///< Array of objects to delete
-    unsigned long long limit            ///< Maximum number of elements to delete 
-);
-/** Formats and prints an array of magicSkyfileMaskRow objects
- *
- * When mdcf is set the formated output is in psMetadataConfig
- * format, otherwise it is in a simple tabular format.
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskPrintObjects(
-    FILE            *stream,            ///< a stream
-    psArray         *objects,           ///< An array of magicSkyfileMaskRow objects
-    bool            mdcf                ///< format as mdconfig or simple
-);
-/** Formats and prints an magicSkyfileMaskRow object
- *
- * When mdcf is set the formated output is in psMetadataConfig
- * format, otherwise it is in a simple tabular format.
- *
- * @return true on success
- */
-
-bool magicSkyfileMaskPrintObject(
-    FILE            *stream,            ///< a stream
-    magicSkyfileMaskRow *object,    ///< an magicSkyfileMaskRow object
     bool            mdcf                ///< format as mdconfig or simple
 );
@@ -12269,7 +12083,9 @@
     psS64           ds_id;
     char            *state;
-    char            *outFileset;
+    char            *name;
+    char            *reqType;
+    char            *outProduct;
     char            *uri;
-    psS16           resultsFile;
+    psS32           fault;
 } pstampRequestRow;
 
@@ -12283,7 +12099,9 @@
     psS64           ds_id,
     const char      *state,
-    const char      *outFileset,
+    const char      *name,
+    const char      *reqType,
+    const char      *outProduct,
     const char      *uri,
-    psS16           resultsFile
+    psS32           fault
 );
 
@@ -12318,7 +12136,9 @@
     psS64           ds_id,
     const char      *state,
-    const char      *outFileset,
+    const char      *name,
+    const char      *reqType,
+    const char      *outProduct,
     const char      *uri,
-    psS16           resultsFile
+    psS32           fault
 );
 
@@ -12478,7 +12298,8 @@
     psS64           job_id;
     psS64           req_id;
+    char            *rownum;
     char            *state;
     char            *jobType;
-    psS32           result;
+    psS32           fault;
     char            *uri;
     char            *outputBase;
@@ -12494,7 +12315,8 @@
     psS64           job_id,
     psS64           req_id,
+    const char      *rownum,
     const char      *state,
     const char      *jobType,
-    psS32           result,
+    psS32           fault,
     const char      *uri,
     const char      *outputBase,
@@ -12531,7 +12353,8 @@
     psS64           job_id,
     psS64           req_id,
+    const char      *rownum,
     const char      *state,
     const char      *jobType,
-    psS32           result,
+    psS32           fault,
     const char      *uri,
     const char      *outputBase,
Index: trunk/ippdb/tests/alloc.c
===================================================================
--- trunk/ippdb/tests/alloc.c	(revision 18044)
+++ trunk/ippdb/tests/alloc.c	(revision 18595)
@@ -1657,5 +1657,5 @@
         stackRunRow     *object;
 
-        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"    );
+        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string"    );
 
         if (!object) {
@@ -1690,4 +1690,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2732,5 +2736,5 @@
         magicRunRow     *object;
 
-        object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
+        object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16    );
 
         if (!object) {
@@ -2765,4 +2769,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2822,5 +2830,5 @@
         magicNodeResultRow *object;
 
-        object = magicNodeResultRowAlloc(-64, "a string", "a string"    );
+        object = magicNodeResultRowAlloc(-64, "a string", "a string", -16    );
 
         if (!object) {
@@ -2840,4 +2848,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -2847,5 +2859,5 @@
         magicMaskRow    *object;
 
-        object = magicMaskRowAlloc(-64, "a string"    );
+        object = magicMaskRowAlloc(-64, "a string", -32, -16    );
 
         if (!object) {
@@ -2861,22 +2873,158 @@
             exit(EXIT_FAILURE);
         }
-
-        psFree(object);
-    }
-
-    {
-        magicSkyfileMaskRow *object;
-
-        object = magicSkyfileMaskRowAlloc(-64, -64, "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->magic_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->diff_id == -64) {
+        if (!object->streaks == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        calDBRow        *object;
+
+        object = calDBRowAlloc(-64, "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->cal_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        calRunRow       *object;
+
+        object = calRunRowAlloc(-64, "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->cal_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->last_step, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        flatcorrRunRow  *object;
+
+        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->corr_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        flatcorrExpRow  *object;
+
+        object = flatcorrExpRowAlloc(-64, -64    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->corr_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->chip_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        pstampDataStoreRow *object;
+
+        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->ds_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->lastFileset, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2891,17 +3039,17 @@
 
     {
-        calDBRow        *object;
-
-        object = calDBRowAlloc(-64, "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->cal_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+        pstampRequestRow *object;
+
+        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", -32    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->req_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->ds_id == -64) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2911,26 +3059,46 @@
             exit(EXIT_FAILURE);
         }
-
-        psFree(object);
-    }
-
-    {
-        calRunRow       *object;
-
-        object = calRunRowAlloc(-64, "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->cal_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->last_step, "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(object->name, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reqType, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->fault == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+    }
+
+    {
+        pstampJobRow    *object;
+
+        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string"    );
+
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!object->job_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (!object->req_id == -64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->rownum, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -2940,170 +3108,9 @@
             exit(EXIT_FAILURE);
         }
-
-        psFree(object);
-    }
-
-    {
-        flatcorrRunRow  *object;
-
-        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->corr_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->stats, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->region, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        flatcorrExpRow  *object;
-
-        object = flatcorrExpRowAlloc(-64, -64    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->corr_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->chip_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        pstampDataStoreRow *object;
-
-        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->ds_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->lastFileset, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        pstampRequestRow *object;
-
-        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->req_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->ds_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->outFileset, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->resultsFile == -16) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-    }
-
-    {
-        pstampJobRow    *object;
-
-        object = pstampJobRowAlloc(-64, -64, "a string", "a string", -32, "a string", "a string", "a string"    );
-
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!object->job_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (!object->req_id == -64) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
         if (strncmp(object->jobType, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
         }
-        if (!object->result == -32) {
+        if (!object->fault == -32) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/createtable.c
===================================================================
--- trunk/ippdb/tests/createtable.c	(revision 18044)
+++ trunk/ippdb/tests/createtable.c	(revision 18595)
@@ -733,19 +733,4 @@
         }
 
-        if(!magicSkyfileMaskCreateTable(dbh)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
         if(!calDBCreateTable(dbh)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/dbcleanup.c
===================================================================
--- trunk/ippdb/tests/dbcleanup.c	(revision 18044)
+++ trunk/ippdb/tests/dbcleanup.c	(revision 18595)
@@ -59,5 +59,4 @@
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS magicNodeResult");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS magicMask");
-    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS magicSkyfileMask");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS calDB");
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS calRun");
Index: trunk/ippdb/tests/dbsetup.c
===================================================================
--- trunk/ippdb/tests/dbsetup.c	(revision 18044)
+++ trunk/ippdb/tests/dbsetup.c	(revision 18595)
@@ -157,7 +157,4 @@
     magicMaskCreateTable(dbh);
 
-    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS magicSkyfileMask");
-    magicSkyfileMaskCreateTable(dbh);
-
     p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS calDB");
     calDBCreateTable(dbh);
Index: trunk/ippdb/tests/droptable.c
===================================================================
--- trunk/ippdb/tests/droptable.c	(revision 18044)
+++ trunk/ippdb/tests/droptable.c	(revision 18595)
@@ -733,19 +733,4 @@
         }
 
-        if (!magicSkyfileMaskDropTable(dbh)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
         if (!calDBDropTable(dbh)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insert.c
===================================================================
--- trunk/ippdb/tests/insert.c	(revision 18044)
+++ trunk/ippdb/tests/insert.c	(revision 18595)
@@ -403,5 +403,5 @@
         }
 
-        if (!stackRunInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string")) {
+        if (!stackRunInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
@@ -658,5 +658,5 @@
         }
 
-        if (!magicRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
+        if (!magicRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16)) {
             exit(EXIT_FAILURE);
         }
@@ -703,35 +703,20 @@
         }
 
-        if (!magicNodeResultInsert(dbh, -64, "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!magicMaskInsert(dbh, -64, "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!magicSkyfileMaskInsert(dbh, -64, -64, "a string")) {
+        if (!magicNodeResultInsert(dbh, -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 (!magicMaskInsert(dbh, -64, "a string", -32, -16)) {
             exit(EXIT_FAILURE);
         }
@@ -823,20 +808,20 @@
         }
 
-        if (!pstampRequestInsert(dbh, -64, -64, "a string", "a string", "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!pstampJobInsert(dbh, -64, -64, "a string", "a string", -32, "a string", "a string", "a string")) {
+        if (!pstampRequestInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", -32)) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!pstampJobInsert(dbh, -64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
Index: trunk/ippdb/tests/insertfits.c
===================================================================
--- trunk/ippdb/tests/insertfits.c	(revision 18044)
+++ trunk/ippdb/tests/insertfits.c	(revision 18595)
@@ -1272,30 +1272,4 @@
         }
 
-        if (!magicSkyfileMaskInsertFits(dbh, fits)) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!psFitsClose(fits)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-        psFits          *fits;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        // open a temp
-        fits = psFitsOpen(TMP_FILENAME, "r");
-        if (!fits) {
-            exit(EXIT_FAILURE);
-        }
-
         if (!calDBInsertFits(dbh, fits)) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insertobject.c
===================================================================
--- trunk/ippdb/tests/insertobject.c	(revision 18044)
+++ trunk/ippdb/tests/insertobject.c	(revision 18595)
@@ -586,5 +586,5 @@
         }
 
-        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
+        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -960,5 +960,5 @@
         }
 
-        object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
+        object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1026,5 +1026,5 @@
         }
 
-        object = magicNodeResultRowAlloc(-64, "a string", "a string");
+        object = magicNodeResultRowAlloc(-64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1048,5 +1048,5 @@
         }
 
-        object = magicMaskRowAlloc(-64, "a string");
+        object = magicMaskRowAlloc(-64, "a string", -32, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1063,26 +1063,4 @@
     {
         psDB            *dbh;
-        magicSkyfileMaskRow *object;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        object = magicSkyfileMaskRowAlloc(-64, -64, "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!magicSkyfileMaskInsertObject(dbh, object)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
         calDBRow        *object;
 
@@ -1202,5 +1180,5 @@
         }
 
-        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16);
+        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", -32);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1224,5 +1202,5 @@
         }
 
-        object = pstampJobRowAlloc(-64, -64, "a string", "a string", -32, "a string", "a string", "a string");
+        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- trunk/ippdb/tests/metadatafromobject.c	(revision 18044)
+++ trunk/ippdb/tests/metadatafromobject.c	(revision 18595)
@@ -1831,5 +1831,5 @@
         bool            status;
 
-        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
+        object = stackRunRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -1869,4 +1869,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -3003,5 +3007,5 @@
         bool            status;
 
-        object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
+        object = magicRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -3041,4 +3045,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -3113,5 +3120,5 @@
         bool            status;
 
-        object = magicNodeResultRowAlloc(-64, "a string", "a string");
+        object = magicNodeResultRowAlloc(-64, "a string", "a string", -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -3136,4 +3143,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -3145,5 +3155,5 @@
         bool            status;
 
-        object = magicMaskRowAlloc(-64, "a string");
+        object = magicMaskRowAlloc(-64, "a string", -32, -16);
         if (!object) {
             exit(EXIT_FAILURE);
@@ -3164,28 +3174,191 @@
             exit(EXIT_FAILURE);
         }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        magicSkyfileMaskRow *object;
-        bool            status;
-
-        object = magicSkyfileMaskRowAlloc(-64, -64, "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = magicSkyfileMaskMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
+        if (!psMetadataLookupS32(&status, md, "streaks") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        calDBRow        *object;
+        bool            status;
+
+        object = calDBRowAlloc(-64, "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = calDBMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        calRunRow       *object;
+        bool            status;
+
+        object = calRunRowAlloc(-64, "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = calRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "last_step"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        flatcorrRunRow  *object;
+        bool            status;
+
+        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = flatcorrRunMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        flatcorrExpRow  *object;
+        bool            status;
+
+        object = flatcorrExpRowAlloc(-64, -64);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = flatcorrExpMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        pstampDataStoreRow *object;
+        bool            status;
+
+        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = pstampDataStoreMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "lastFileset"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "outProduct"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3201,23 +3374,22 @@
     {
         psMetadata      *md;
-        calDBRow        *object;
-        bool            status;
-
-        object = calDBRowAlloc(-64, "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = calDBMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
+        pstampRequestRow *object;
+        bool            status;
+
+        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", -32);
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = pstampRequestMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3227,33 +3399,52 @@
             exit(EXIT_FAILURE);
         }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        calRunRow       *object;
-        bool            status;
-
-        object = calRunRowAlloc(-64, "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = calRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "last_step"), "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(psMetadataLookupPtr(&status, md, "name"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "reqType"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "outProduct"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataLookupS32(&status, md, "fault") == -32) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(md);
+    }
+
+    {
+        psMetadata      *md;
+        pstampJobRow    *object;
+        bool            status;
+
+        object = pstampJobRowAlloc(-64, -64, "a string", "a string", "a string", -32, "a string", "a string", "a string");
+        if (!object) {
+            exit(EXIT_FAILURE);
+        }
+
+        md = pstampJobMetadataFromObject(object);
+        if (!md) {
+            exit(EXIT_FAILURE);
+        }
+
+        psFree(object);
+
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "rownum"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -3263,201 +3454,9 @@
             exit(EXIT_FAILURE);
         }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        flatcorrRunRow  *object;
-        bool            status;
-
-        object = flatcorrRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = flatcorrRunMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "stats"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "region"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        flatcorrExpRow  *object;
-        bool            status;
-
-        object = flatcorrExpRowAlloc(-64, -64);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = flatcorrExpMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        pstampDataStoreRow *object;
-        bool            status;
-
-        object = pstampDataStoreRowAlloc(-64, "a string", "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = pstampDataStoreMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "lastFileset"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "outProduct"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        pstampRequestRow *object;
-        bool            status;
-
-        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16);
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = pstampRequestMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "outFileset"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "uri"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-    }
-
-    {
-        psMetadata      *md;
-        pstampJobRow    *object;
-        bool            status;
-
-        object = pstampJobRowAlloc(-64, -64, "a string", "a string", -32, "a string", "a string", "a string");
-        if (!object) {
-            exit(EXIT_FAILURE);
-        }
-
-        md = pstampJobMetadataFromObject(object);
-        if (!md) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(object);
-
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
         if (strncmp(psMetadataLookupPtr(&status, md, "jobType"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataLookupS32(&status, md, "result") == -32) {
+        if (!psMetadataLookupS32(&status, md, "fault") == -32) {
             psFree(md);
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- trunk/ippdb/tests/objectfrommetadata.c	(revision 18044)
+++ trunk/ippdb/tests/objectfrommetadata.c	(revision 18595)
@@ -3051,4 +3051,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = stackRunObjectFromMetadata(md);
@@ -3083,4 +3087,8 @@
         }
         if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -4987,4 +4995,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = magicRunObjectFromMetadata(md);
@@ -5016,4 +5027,7 @@
         }
         if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5120,4 +5134,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = magicNodeResultObjectFromMetadata(md);
@@ -5137,4 +5154,7 @@
         }
         if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5156,4 +5176,11 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "streaks", 0, NULL, -32)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = magicMaskObjectFromMetadata(md);
@@ -5172,39 +5199,8 @@
             exit(EXIT_FAILURE);
         }
-
-        psFree(object);
-    }
-
-    {
-        psMetadata      *md;
-        magicSkyfileMaskRow *object;
-
-        md = psMetadataAlloc();
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-        if (!psMetadataAddStr(md, PS_LIST_TAIL, "uri", 0, NULL, "a string")) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        object = magicSkyfileMaskObjectFromMetadata(md);
-        if (!object) {
-            psFree(md);
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(md);
-
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-            psFree(object);
-            exit(EXIT_FAILURE);
-        }
-        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+        if (!object->streaks == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5483,5 +5479,13 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddStr(md, PS_LIST_TAIL, "outFileset", 0, NULL, "a string")) {
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "name", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "reqType", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "outProduct", 0, NULL, "a string")) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -5491,4 +5495,5 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "fault", 0, NULL, -32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -5513,5 +5518,13 @@
             exit(EXIT_FAILURE);
         }
-        if (strncmp(object->outFileset, "a string", MAX_STRING_LENGTH)) {
+        if (strncmp(object->name, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->reqType, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->outProduct, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5521,4 +5534,5 @@
             exit(EXIT_FAILURE);
         }
+        if (!object->fault == -32) {
             psFree(object);
             exit(EXIT_FAILURE);
@@ -5539,4 +5553,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "rownum", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "state", 0, NULL, "a string")) {
             psFree(md);
@@ -5547,5 +5565,5 @@
             exit(EXIT_FAILURE);
         }
-        if (!psMetadataAddS32(md, PS_LIST_TAIL, "result", 0, NULL, -32)) {
+        if (!psMetadataAddS32(md, PS_LIST_TAIL, "fault", 0, NULL, -32)) {
             psFree(md);
             exit(EXIT_FAILURE);
@@ -5578,4 +5596,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->rownum, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
         if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
@@ -5586,5 +5608,5 @@
             exit(EXIT_FAILURE);
         }
-        if (!object->result == -32) {
+        if (!object->fault == -32) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/selectrowsfits.c
===================================================================
--- trunk/ippdb/tests/selectrowsfits.c	(revision 18044)
+++ trunk/ippdb/tests/selectrowsfits.c	(revision 18595)
@@ -1077,26 +1077,4 @@
         }
 
-        if (!magicSkyfileMaskSelectRowsFits(dbh, fits, NULL, 1)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psFree(fits);
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-        psFits          *fits;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        fits = psFitsOpen(TMP_FILENAME, "w");
-        if (!fits) {
-            exit(EXIT_FAILURE);
-        }
-
         if (!calDBSelectRowsFits(dbh, fits, NULL, 1)) {
             exit(EXIT_FAILURE);
