Index: /trunk/glueforge/templates/psdb/Makefile.am
===================================================================
--- /trunk/glueforge/templates/psdb/Makefile.am	(revision 8315)
+++ /trunk/glueforge/templates/psdb/Makefile.am	(revision 8316)
@@ -47,4 +47,6 @@
     insertobject_c.tt \
     insertobject_h.tt \
+    insertobjects.tt \
+    insertobjects_h.tt \
     makefile.tt \
     metadatafromobject.tt \
Index: /trunk/glueforge/templates/psdb/code.tt
===================================================================
--- /trunk/glueforge/templates/psdb/code.tt	(revision 8315)
+++ /trunk/glueforge/templates/psdb/code.tt	(revision 8316)
@@ -24,4 +24,5 @@
 [% INCLUDE pop.tt %]
 [% INCLUDE insertobject.tt %]
+[% INCLUDE insertobjects.tt %]
 [% INCLUDE popobject.tt %]
 [% INCLUDE insertfits.tt %]
Index: /trunk/glueforge/templates/psdb/header.tt
===================================================================
--- /trunk/glueforge/templates/psdb/header.tt	(revision 8315)
+++ /trunk/glueforge/templates/psdb/header.tt	(revision 8316)
@@ -26,4 +26,5 @@
 [% INCLUDE pop_h.tt %]
 [% INCLUDE insertobject_h.tt %]
+[% INCLUDE insertobjects_h.tt %]
 [% INCLUDE popobject_h.tt %]
 [% INCLUDE insertfits_h.tt %]
Index: /trunk/glueforge/templates/psdb/insertobjects.tt
===================================================================
--- /trunk/glueforge/templates/psdb/insertobjects.tt	(revision 8316)
+++ /trunk/glueforge/templates/psdb/insertobjects.tt	(revision 8316)
@@ -0,0 +1,10 @@
+bool [% table.namespace %]InsertObjects(psDB *dbh, psArray *objects)
+{
+    for (long i = 0; i < psArrayLength(objects); i++) {
+        if (![% table.namespace %]InsertObject(dbh, objects->data[i])) {
+            return false;
+        }
+    }
+
+    return true;
+}
Index: /trunk/glueforge/templates/psdb/insertobjects_h.tt
===================================================================
--- /trunk/glueforge/templates/psdb/insertobjects_h.tt	(revision 8316)
+++ /trunk/glueforge/templates/psdb/insertobjects_h.tt	(revision 8316)
@@ -0,0 +1,11 @@
+/** Insert an array of [% table.object_name %] object into a table
+ *
+ * This function constructs and inserts multiple rows based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool [% table.namespace %]InsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of [% table.object_name %] objects
+);
