Update of /cvsroot/monetdb/pathfinder/compiler
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27811/compiler

Modified Files:
        compile.c main.c 
Log Message:

You can invoke Pathfinders SQL genereation with -g only now.
-Pg for pretty printing.


Index: compile.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/compile.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- compile.c   20 Feb 2007 12:06:51 -0000      1.102
+++ compile.c   5 Mar 2007 19:03:48 -0000       1.103
@@ -57,6 +57,7 @@
 #include "prettyp.h"
 #include "abssynprint.h"
 #include "coreprint.h"
+#include "prettysql.h"
 #include "logdebug.h"
 #include "timer.h"
 #include "fs.h"           /* core mapping (formal semantics) */
@@ -693,11 +694,15 @@
          if(laroot) {
              /* this is not the final semantic of this function */
              PFsql_t* sqlroot = PFlalg2sql(laroot);
-
-             if( sqlroot ) {
-                 PFarray_t *sqlprog = PFsql_serialize( sqlroot );
-                 if( sqlprog )
-                     PFsqlprint(pfout, sqlprog);
+             if (sqlroot) {
+                 if (status->print_pretty) {
+                     PFsql_pretty(pfout, sqlroot);
+                 }
+                 else {
+                     PFarray_t *sqlprog = PFsql_serialize( sqlroot );
+                     if( sqlprog )
+                         PFsqlprint(pfout, sqlprog);
+                 }
              }
          }
          else

Index: main.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/main.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- main.c      2 Mar 2007 12:35:39 -0000       1.82
+++ main.c      5 Mar 2007 19:03:48 -0000       1.83
@@ -718,9 +718,7 @@
                 for (i = 1; i < (sizeof (phases) / sizeof (char *)); i++)
                     printf ("        %2u  %s\n", i, phases[i]);
 
-                printf ("  -g%s: generate SQL code\n"
-                        "        (works best with -Algs16 flags).\n"
-                        "        Current version doesn't support documents.\n",
+                printf ("  -g%s: generate SQL code\n",
                         long_option (opt_buf, ", --%s", 'g'));
 
 #ifndef NDEBUG
@@ -917,6 +915,8 @@
                 status->print_types = true;
                 break;
             case 'g':
+                status->summer_branch = false;
+                status->stop_after = 19;
                 status->generate_sql = true;
                 break;
             default:


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to