OSDN Git Service

*** empty log message ***
authorMichael Meskes <meskes@postgresql.org>
Fri, 25 Feb 2000 15:26:12 +0000 (15:26 +0000)
committerMichael Meskes <meskes@postgresql.org>
Fri, 25 Feb 2000 15:26:12 +0000 (15:26 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/lib/descriptor.c
src/interfaces/ecpg/preproc/output.c
src/interfaces/ecpg/preproc/preproc.y

index 7a0a577..0e6b37a 100644 (file)
@@ -828,5 +828,9 @@ Tue Feb 22 13:48:18 CET 2000
 Wed Feb 23 17:08:28 CET 2000
 
        - Even more clean ups.
+
+Fri Feb 25 16:13:11 CET 2000
+
+       - Fixed some bugs I created when I cleaned up, thanks Christof.
        - Set library version to 3.1.0.
        - Set ecpg version to 2.7.0.
index 43dd8bf..fc416bd 100644 (file)
@@ -37,7 +37,6 @@ extern                "C"
        char *ecpg_strdup(const char *, int);
        const char *ECPGtype_name(enum ECPGttype);
        
-
 /* and some vars */
        extern struct auto_mem *auto_allocs;
 
index 1b85340..1f0c553 100644 (file)
@@ -47,7 +47,6 @@ ECPGDynamicType(Oid type)
        }
 }
 
-#if 0
 static unsigned int
 ECPGDynamicType_DDT(Oid type)
 {
@@ -61,7 +60,7 @@ ECPGDynamicType_DDT(Oid type)
                        return SQL3_DDT_ILLEGAL;
        }
 }
-#endif
+
 
 bool
 ECPGget_desc_header(int lineno, char * desc_name, int *count)
@@ -260,6 +259,12 @@ ECPGget_desc(int lineno, char *desc_name, int index, ...)
                                ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType(PQftype(ECPGresult, index)));
                                break;
 
+                        case ECPGd_di_code:
+                               if (!get_int_item(lineno, var, vartype, ECPGDynamicType_DDT(PQftype(ECPGresult, index))))
+                                       return (false);
+                                       
+                               ECPGlog("ECPGget_desc: TYPE = %d\n", ECPGDynamicType_DDT(PQftype(ECPGresult, index)));
+                               break;
                        case ECPGd_data:
                                if (!get_data(ECPGresult, 0, index, lineno, vartype, ECPGt_NO_INDICATOR, var, NULL, varcharsize, offset))
                                        return (false);                         
index c60adf8..91b2308 100644 (file)
@@ -120,6 +120,7 @@ output_statement(char * stmt, int mode, char *descriptor)
        mode |= 2;
        whenever_action(mode);
        free(stmt);
+       free(descriptor);
        if (connection != NULL)
                free(connection);
 }
index a42b68f..ed5e27d 100644 (file)
@@ -491,11 +491,7 @@ stmt:  AlterTableStmt                      { output_statement($1, 0, NULL); }
                                                free($1);
                                        } 
                | ECPGExecute           {       output_statement($1, 0, NULL); }
-               | ECPGFetchDescStmt     {
-                                               output_statement($1.str, 1, $1.name);
-                                               free($1.str);
-                                               free($1.name);
-                                       }
+               | ECPGFetchDescStmt     {       output_statement($1.str, 1, $1.name); }
                | ECPGFree              {
                                                fprintf(yyout, "{ ECPGdeallocate(__LINE__, \"%s\");", $1);