aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2000-02-25 15:26:12 +0000
committerMichael Meskes <meskes@postgresql.org>2000-02-25 15:26:12 +0000
commitc05abfb1a845e1bf5e66638ee2b83609468ebfd6 (patch)
tree0602b7943ab03918d2df23f34998f56ea1b2c1a4
parent70130905d10162075d7bb3b8cc0441affee77a05 (diff)
downloadpostgresql-c05abfb1a845e1bf5e66638ee2b83609468ebfd6.tar.gz
postgresql-c05abfb1a845e1bf5e66638ee2b83609468ebfd6.zip
*** empty log message ***
-rw-r--r--src/interfaces/ecpg/ChangeLog4
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h1
-rw-r--r--src/interfaces/ecpg/lib/descriptor.c9
-rw-r--r--src/interfaces/ecpg/preproc/output.c1
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y6
5 files changed, 13 insertions, 8 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 7a0a577be35..0e6b37ae833 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -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.
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index 43dd8bf1c4f..fc416bd4fb3 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -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;
diff --git a/src/interfaces/ecpg/lib/descriptor.c b/src/interfaces/ecpg/lib/descriptor.c
index 1b85340864c..1f0c5536f79 100644
--- a/src/interfaces/ecpg/lib/descriptor.c
+++ b/src/interfaces/ecpg/lib/descriptor.c
@@ -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);
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
index c60adf8f408..91b23083172 100644
--- a/src/interfaces/ecpg/preproc/output.c
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -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);
}
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index a42b68f7deb..ed5e27db3a3 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -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);