Index: trunk/ippdb/tests/alloc.c
===================================================================
--- trunk/ippdb/tests/alloc.c	(revision 9173)
+++ trunk/ippdb/tests/alloc.c	(revision 9187)
@@ -496,5 +496,5 @@
         rawDetrendExpRow *object;
 
-        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64    );
+        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string"    );
 
         if (!object) {
@@ -570,4 +570,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obstype, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -577,5 +581,5 @@
         rawScienceExpRow *object;
 
-        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64    );
+        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string"    );
 
         if (!object) {
@@ -651,4 +655,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obstype, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -658,5 +666,5 @@
         rawImfileRow    *object;
 
-        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64    );
+        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string"    );
 
         if (!object) {
@@ -729,4 +737,8 @@
         }
         if (!object->posang == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->obstype, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insert.c
===================================================================
--- trunk/ippdb/tests/insert.c	(revision 9173)
+++ trunk/ippdb/tests/insert.c	(revision 9187)
@@ -208,35 +208,35 @@
         }
 
-        if (!rawDetrendExpInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawScienceExpInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawImfileInsert(dbh, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64)) {
+        if (!rawDetrendExpInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawScienceExpInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawImfileInsert(dbh, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string")) {
             exit(EXIT_FAILURE);
         }
Index: trunk/ippdb/tests/insertobject.c
===================================================================
--- trunk/ippdb/tests/insertobject.c	(revision 9173)
+++ trunk/ippdb/tests/insertobject.c	(revision 9187)
@@ -300,5 +300,5 @@
         }
 
-        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
+        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -322,5 +322,5 @@
         }
 
-        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
+        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -344,5 +344,5 @@
         }
 
-        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
+        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string");
         if (!object) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- trunk/ippdb/tests/metadatafromobject.c	(revision 9173)
+++ trunk/ippdb/tests/metadatafromobject.c	(revision 9187)
@@ -602,5 +602,5 @@
         bool            status;
 
-        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
+        object = rawDetrendExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -682,4 +682,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "obstype"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -691,5 +695,5 @@
         bool            status;
 
-        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
+        object = rawScienceExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -771,4 +775,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(psMetadataLookupPtr(&status, md, "obstype"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -780,5 +788,5 @@
         bool            status;
 
-        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64);
+        object = rawImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -857,4 +865,8 @@
         }
         if (!psMetadataLookupF64(&status, md, "posang") == 64.64) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(psMetadataLookupPtr(&status, md, "obstype"), "a string", MAX_STRING_LENGTH)) {
             psFree(md);
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- trunk/ippdb/tests/objectfrommetadata.c	(revision 9173)
+++ trunk/ippdb/tests/objectfrommetadata.c	(revision 9187)
@@ -947,4 +947,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "obstype", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = rawDetrendExpObjectFromMetadata(md);
@@ -1024,4 +1028,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obstype, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1101,4 +1109,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "obstype", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = rawScienceExpObjectFromMetadata(md);
@@ -1178,4 +1190,8 @@
             exit(EXIT_FAILURE);
         }
+        if (strncmp(object->obstype, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -1255,4 +1271,8 @@
             exit(EXIT_FAILURE);
         }
+        if (!psMetadataAddStr(md, PS_LIST_TAIL, "obstype", 0, NULL, "a string")) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = rawImfileObjectFromMetadata(md);
@@ -1329,4 +1349,8 @@
         }
         if (!object->posang == 64.64) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
+        if (strncmp(object->obstype, "a string", MAX_STRING_LENGTH)) {
             psFree(object);
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/pop.c
===================================================================
--- trunk/ippdb/tests/pop.c	(revision 9173)
+++ trunk/ippdb/tests/pop.c	(revision 9187)
@@ -298,11 +298,12 @@
         psF32           ccd_temp;
         psF64           posang;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawDetrendExpPop(dbh, (char **)&exp_tag, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) { 
+        char            obstype[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawDetrendExpPop(dbh, (char **)&exp_tag, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang, (char **)&obstype)) { 
             exit(EXIT_FAILURE);
         }
@@ -330,11 +331,12 @@
         psF32           ccd_temp;
         psF64           posang;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawScienceExpPop(dbh, (char **)&exp_tag, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) { 
+        char            obstype[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawScienceExpPop(dbh, (char **)&exp_tag, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang, (char **)&obstype)) { 
             exit(EXIT_FAILURE);
         }
@@ -362,11 +364,12 @@
         psF32           ccd_temp;
         psF64           posang;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawImfilePop(dbh, (char **)&exp_tag, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&exp_type, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) { 
+        char            obstype[256];
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawImfilePop(dbh, (char **)&exp_tag, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&exp_type, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang, (char **)&obstype)) { 
             exit(EXIT_FAILURE);
         }
