Index: /trunk/psLib/src/astronomy/psDB.c
===================================================================
--- /trunk/psLib/src/astronomy/psDB.c	(revision 3531)
+++ /trunk/psLib/src/astronomy/psDB.c	(revision 3532)
@@ -8,6 +8,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -112,10 +112,10 @@
     psFree(dbh);
 
-    // these lookup tables should probably be moved into psDB to prevent them
-    // from being flushed in the case that a database handle is closed while
-    // one or more are still open
+    // ASC WARNING NOTE: the psDBSQLToPTypeTableCleanup cleanup routine
+    // needs to be called first because it refers to
+    // psDBGetPTypeToSQLTable ...
+    psDBSQLToPTypeTableCleanup();
     psDBMySQLToSQLTableCleanup();
     psDBPTypeToSQLTableCleanup();
-    psDBSQLToPTypeTableCleanup();
     psDBPTypeToMySQLTableCleanup();
 }
@@ -848,16 +848,20 @@
     // find column name and type
     while ((item = psListGetAndIncrement(cursor))) {
-        if ((item->type == PS_TYPE_S32) || (item->type == PS_TYPE_F32) || (item->type == PS_TYPE_F64)) {
+        if ((item->type == PS_META_S32) || (item->type == PS_META_F32) || (item->type == PS_META_F64)) {
             // + column name + _ + column type
             colType = psDBPTypeToSQL(item->type);
             psStringAppend(&query, "%s %s", item->name, colType);
             psFree(colType);
-        } else if (item->type == PS_TYPE_PTR) {
+        } else if ((item->type == PS_META_STR)         || (item->type == PS_META_VEC)    ||
+                   (item->type == PS_META_IMG)         || (item->type == PS_META_HASH)   ||
+                   (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG)   ||
+                   (item->type == PS_META_PNG)         || (item->type == PS_META_ASTROM) ||
+                   (item->type == PS_META_UNKNOWN)) {
             // + column name + _ + varchar( + length + )
             psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V);
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    "FIXME: Only type of PS_TYPE_S32, PS_TYPE_F32, PS_TYPE_F64, "
-                    "and PS_TYPE_PTR are supported.");
+                    "FIXME: Only type of PS_META_S32, PS_META_F32, PS_META_F64, "
+                    "and PS_META_* pointer types are supported, (not %d).", item->type);
 
             psFree(query);
Index: /trunk/psLib/src/astronomy/psDB.h
===================================================================
--- /trunk/psLib/src/astronomy/psDB.h	(revision 3531)
+++ /trunk/psLib/src/astronomy/psDB.h	(revision 3532)
@@ -10,6 +10,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -175,5 +175,5 @@
  *
  * The "row" specification uses the psMetadataItem name as the column name.
- * The field values maybe specified in any order.  psMetadata types beyond
+ * The field values may be specified in any order.  psMetadata types beyond
  * PS_META_STR and PS_META_PRIMITIVE are not supported.  If fields are
  * specified in "row" that do not exist in "tableName", the insert will fail.
Index: /trunk/psLib/src/dataIO/psDB.c
===================================================================
--- /trunk/psLib/src/dataIO/psDB.c	(revision 3531)
+++ /trunk/psLib/src/dataIO/psDB.c	(revision 3532)
@@ -8,6 +8,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -112,10 +112,10 @@
     psFree(dbh);
 
-    // these lookup tables should probably be moved into psDB to prevent them
-    // from being flushed in the case that a database handle is closed while
-    // one or more are still open
+    // ASC WARNING NOTE: the psDBSQLToPTypeTableCleanup cleanup routine
+    // needs to be called first because it refers to
+    // psDBGetPTypeToSQLTable ...
+    psDBSQLToPTypeTableCleanup();
     psDBMySQLToSQLTableCleanup();
     psDBPTypeToSQLTableCleanup();
-    psDBSQLToPTypeTableCleanup();
     psDBPTypeToMySQLTableCleanup();
 }
@@ -848,16 +848,20 @@
     // find column name and type
     while ((item = psListGetAndIncrement(cursor))) {
-        if ((item->type == PS_TYPE_S32) || (item->type == PS_TYPE_F32) || (item->type == PS_TYPE_F64)) {
+        if ((item->type == PS_META_S32) || (item->type == PS_META_F32) || (item->type == PS_META_F64)) {
             // + column name + _ + column type
             colType = psDBPTypeToSQL(item->type);
             psStringAppend(&query, "%s %s", item->name, colType);
             psFree(colType);
-        } else if (item->type == PS_TYPE_PTR) {
+        } else if ((item->type == PS_META_STR)         || (item->type == PS_META_VEC)    ||
+                   (item->type == PS_META_IMG)         || (item->type == PS_META_HASH)   ||
+                   (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG)   ||
+                   (item->type == PS_META_PNG)         || (item->type == PS_META_ASTROM) ||
+                   (item->type == PS_META_UNKNOWN)) {
             // + column name + _ + varchar( + length + )
             psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V);
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    "FIXME: Only type of PS_TYPE_S32, PS_TYPE_F32, PS_TYPE_F64, "
-                    "and PS_TYPE_PTR are supported.");
+                    "FIXME: Only type of PS_META_S32, PS_META_F32, PS_META_F64, "
+                    "and PS_META_* pointer types are supported, (not %d).", item->type);
 
             psFree(query);
Index: /trunk/psLib/src/dataIO/psDB.h
===================================================================
--- /trunk/psLib/src/dataIO/psDB.h	(revision 3531)
+++ /trunk/psLib/src/dataIO/psDB.h	(revision 3532)
@@ -10,6 +10,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -175,5 +175,5 @@
  *
  * The "row" specification uses the psMetadataItem name as the column name.
- * The field values maybe specified in any order.  psMetadata types beyond
+ * The field values may be specified in any order.  psMetadata types beyond
  * PS_META_STR and PS_META_PRIMITIVE are not supported.  If fields are
  * specified in "row" that do not exist in "tableName", the insert will fail.
Index: /trunk/psLib/src/db/psDB.c
===================================================================
--- /trunk/psLib/src/db/psDB.c	(revision 3531)
+++ /trunk/psLib/src/db/psDB.c	(revision 3532)
@@ -8,6 +8,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -112,10 +112,10 @@
     psFree(dbh);
 
-    // these lookup tables should probably be moved into psDB to prevent them
-    // from being flushed in the case that a database handle is closed while
-    // one or more are still open
+    // ASC WARNING NOTE: the psDBSQLToPTypeTableCleanup cleanup routine
+    // needs to be called first because it refers to
+    // psDBGetPTypeToSQLTable ...
+    psDBSQLToPTypeTableCleanup();
     psDBMySQLToSQLTableCleanup();
     psDBPTypeToSQLTableCleanup();
-    psDBSQLToPTypeTableCleanup();
     psDBPTypeToMySQLTableCleanup();
 }
@@ -848,16 +848,20 @@
     // find column name and type
     while ((item = psListGetAndIncrement(cursor))) {
-        if ((item->type == PS_TYPE_S32) || (item->type == PS_TYPE_F32) || (item->type == PS_TYPE_F64)) {
+        if ((item->type == PS_META_S32) || (item->type == PS_META_F32) || (item->type == PS_META_F64)) {
             // + column name + _ + column type
             colType = psDBPTypeToSQL(item->type);
             psStringAppend(&query, "%s %s", item->name, colType);
             psFree(colType);
-        } else if (item->type == PS_TYPE_PTR) {
+        } else if ((item->type == PS_META_STR)         || (item->type == PS_META_VEC)    ||
+                   (item->type == PS_META_IMG)         || (item->type == PS_META_HASH)   ||
+                   (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG)   ||
+                   (item->type == PS_META_PNG)         || (item->type == PS_META_ASTROM) ||
+                   (item->type == PS_META_UNKNOWN)) {
             // + column name + _ + varchar( + length + )
             psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V);
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    "FIXME: Only type of PS_TYPE_S32, PS_TYPE_F32, PS_TYPE_F64, "
-                    "and PS_TYPE_PTR are supported.");
+                    "FIXME: Only type of PS_META_S32, PS_META_F32, PS_META_F64, "
+                    "and PS_META_* pointer types are supported, (not %d).", item->type);
 
             psFree(query);
Index: /trunk/psLib/src/db/psDB.h
===================================================================
--- /trunk/psLib/src/db/psDB.h	(revision 3531)
+++ /trunk/psLib/src/db/psDB.h	(revision 3532)
@@ -10,6 +10,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -175,5 +175,5 @@
  *
  * The "row" specification uses the psMetadataItem name as the column name.
- * The field values maybe specified in any order.  psMetadata types beyond
+ * The field values may be specified in any order.  psMetadata types beyond
  * PS_META_STR and PS_META_PRIMITIVE are not supported.  If fields are
  * specified in "row" that do not exist in "tableName", the insert will fail.
Index: /trunk/psLib/src/fileUtils/psDB.c
===================================================================
--- /trunk/psLib/src/fileUtils/psDB.c	(revision 3531)
+++ /trunk/psLib/src/fileUtils/psDB.c	(revision 3532)
@@ -8,6 +8,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -112,10 +112,10 @@
     psFree(dbh);
 
-    // these lookup tables should probably be moved into psDB to prevent them
-    // from being flushed in the case that a database handle is closed while
-    // one or more are still open
+    // ASC WARNING NOTE: the psDBSQLToPTypeTableCleanup cleanup routine
+    // needs to be called first because it refers to
+    // psDBGetPTypeToSQLTable ...
+    psDBSQLToPTypeTableCleanup();
     psDBMySQLToSQLTableCleanup();
     psDBPTypeToSQLTableCleanup();
-    psDBSQLToPTypeTableCleanup();
     psDBPTypeToMySQLTableCleanup();
 }
@@ -848,16 +848,20 @@
     // find column name and type
     while ((item = psListGetAndIncrement(cursor))) {
-        if ((item->type == PS_TYPE_S32) || (item->type == PS_TYPE_F32) || (item->type == PS_TYPE_F64)) {
+        if ((item->type == PS_META_S32) || (item->type == PS_META_F32) || (item->type == PS_META_F64)) {
             // + column name + _ + column type
             colType = psDBPTypeToSQL(item->type);
             psStringAppend(&query, "%s %s", item->name, colType);
             psFree(colType);
-        } else if (item->type == PS_TYPE_PTR) {
+        } else if ((item->type == PS_META_STR)         || (item->type == PS_META_VEC)    ||
+                   (item->type == PS_META_IMG)         || (item->type == PS_META_HASH)   ||
+                   (item->type == PS_META_LOOKUPTABLE) || (item->type == PS_META_JPEG)   ||
+                   (item->type == PS_META_PNG)         || (item->type == PS_META_ASTROM) ||
+                   (item->type == PS_META_UNKNOWN)) {
             // + column name + _ + varchar( + length + )
             psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.V);
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                    "FIXME: Only type of PS_TYPE_S32, PS_TYPE_F32, PS_TYPE_F64, "
-                    "and PS_TYPE_PTR are supported.");
+                    "FIXME: Only type of PS_META_S32, PS_META_F32, PS_META_F64, "
+                    "and PS_META_* pointer types are supported, (not %d).", item->type);
 
             psFree(query);
Index: /trunk/psLib/src/fileUtils/psDB.h
===================================================================
--- /trunk/psLib/src/fileUtils/psDB.h	(revision 3531)
+++ /trunk/psLib/src/fileUtils/psDB.h	(revision 3532)
@@ -10,6 +10,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-03-11 23:17:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-03-28 22:54:19 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -175,5 +175,5 @@
  *
  * The "row" specification uses the psMetadataItem name as the column name.
- * The field values maybe specified in any order.  psMetadata types beyond
+ * The field values may be specified in any order.  psMetadata types beyond
  * PS_META_STR and PS_META_PRIMITIVE are not supported.  If fields are
  * specified in "row" that do not exist in "tableName", the insert will fail.
