Update of /cvsroot/monetdb/pathfinder/compiler/debug
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4487/compiler/debug

Modified Files:
        logdebug.c 
Log Message:
-- Improved the robustness and correctness of the sql-code-generation for the 
serialize_rel(empty_tbl) tree pattern.
-- Extended the schema-information of the empty_tbl operator with types.

Index: logdebug.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/debug/logdebug.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- logdebug.c  14 Jan 2008 14:03:27 -0000      1.87
+++ logdebug.c  15 Jan 2008 13:57:14 -0000      1.88
@@ -1539,11 +1539,55 @@
 
         case la_empty_tbl:
             PFarray_printf (xml, "    <content>\n"); 
+
             /* list the attributes of this table */
-            for (c = 0; c < n->schema.count;c++)
-                PFarray_printf (xml, 
-                                "      <column name=\"%s\" new=\"true\"/>\n",
-                                PFatt_str (n->schema.items[c].name));
+            for (unsigned int i = 0; i < n->schema.count; i++) {
+                bool first = true;
+
+                PFarray_printf (xml, "      <column name=\"%s\" type=\"",
+                                PFatt_str (n->schema.items[i].name));
+
+                if (n->schema.items[i].type & aat_update)
+                    PFarray_printf (xml, "update");
+                else
+                    for (PFalg_simple_type_t t = 1; t; t <<= 1) {
+                        if (t & n->schema.items[i].type) {
+                            /* hide fragment information */
+                            switch (t) {
+                                case aat_afrag:
+                                case aat_pfrag:
+                                    continue;
+                                default:
+                                    break;
+                            }
+
+                            /* start printing spaces only after the first type 
*/
+                            if (!first)
+                                PFarray_printf (xml, " ");
+                            else
+                                first = false;
+
+                            /* print the different types */
+                            switch (t) {
+                                case aat_nat:    PFarray_printf (xml, "nat");  
 break;
+                                case aat_int:    PFarray_printf (xml, "int");  
 break;
+                                case aat_str:    PFarray_printf (xml, "str");  
 break;
+                                case aat_dec:    PFarray_printf (xml, "dec");  
 break;
+                                case aat_dbl:    PFarray_printf (xml, "dbl");  
 break;
+                                case aat_bln:    PFarray_printf (xml, "bln");  
 break;
+                                case aat_qname:  PFarray_printf (xml, 
"qname"); break;
+                                case aat_uA:     PFarray_printf (xml, "uA");   
 break;
+                                case aat_attr:   PFarray_printf (xml, "attr"); 
 break;
+                                case aat_pre:    PFarray_printf (xml, "node"); 
 break;
+                                default:                                       
 break;
+                            }
+                        }
+                    }
+                PFarray_printf (xml, "\" new=\"true\"/>\n");
+            }
+
+             
+
 
             PFarray_printf (xml, "    </content>\n");
             break;


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to