Index: trunk/pstamp/src/pstampparse.c
===================================================================
--- trunk/pstamp/src/pstampparse.c	(revision 16878)
+++ trunk/pstamp/src/pstampparse.c	(revision 16897)
@@ -262,5 +262,6 @@
 
     psStringAppend(&query, "SELECT %%s from %s WHERE %s = %%s", table, id_type);
-    if (class_id) {
+    // append class_id unless it is set to the special value "all"
+    if (class_id && strcmp("all", class_id)) {
         psStringAppend(&query, "%s", " and class_id = '%s'" );
     }
@@ -682,7 +683,9 @@
     }
     psString roiString = parseROI(options);
+#ifdef notdef
     if (!roiString) {
         return false;
     }
+#endif
 
     psArray *uris = NULL;
@@ -695,4 +698,8 @@
     } else if (!strcmp(req_type, "bycoord")) {
         // images from a particular region of the sky
+        if (!roiString) {
+            fprintf(stderr, "req_type: bycoord with NULL ROI\n");
+            return false;
+        }
         uris = parseByCoord(options);
     } else {
