]> andersk Git - moira.git/blobdiff - gen/stats.dc
New database and column names for Moira2.
[moira.git] / gen / stats.dc
index 4e8dd9a58665bc07bbc7ca06748b083d0a13faa5..78d6de9e740b52bf7154ff42913e385fbd3a8f91 100644 (file)
@@ -37,10 +37,10 @@ char **argv;
     EXEC SQL END DECLARE SECTION;
 
 #ifsql INGRES
-    EXEC SQL CONNECT sms;
+    EXEC SQL CONNECT moira;
 #endsql
 #ifsql INFORMIX
-    EXEC SQL DATABASE sms;
+    EXEC SQL DATABASE moira;
 #endsql
 
     if (argc == 2) {
@@ -67,6 +67,10 @@ char **argv;
        outf = NULL;
     }
 
+    /* The following is declarative, not executed,
+     * and so is dependent on where it is in the file,
+     * not in the order of execution of statements.
+     */
     EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
 
     machines = create_hash(1000);
@@ -85,7 +89,7 @@ char **argv;
     EXEC SQL DECLARE x CURSOR FOR
       SELECT DISTINCT f.mach_id, count(f.filsys_id)
       FROM filesys f
-       WHERE f.type="NFS"
+       WHERE f.type='NFS'
       GROUP BY f.mach_id;
     EXEC SQL OPEN x;
     while (1) {
This page took 0.096644 seconds and 4 git commands to generate.