summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/lib/ecpglib.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2000-02-14 10:00:06 +0000
committerMichael Meskes <meskes@postgresql.org>2000-02-14 10:00:06 +0000
commit08b999f1bd5f1aa0ca0da07fa4d5410708ab94d8 (patch)
tree18b49a215b623195e41e8cc8e5d47ee084517e75 /src/interfaces/ecpg/lib/ecpglib.c
parent9672d38f91f908e8a314d2f4500d9ec6b24d3b02 (diff)
*** empty log message ***
Diffstat (limited to 'src/interfaces/ecpg/lib/ecpglib.c')
-rw-r--r--src/interfaces/ecpg/lib/ecpglib.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/lib/ecpglib.c b/src/interfaces/ecpg/lib/ecpglib.c
index 7e755782715..15440d09d9d 100644
--- a/src/interfaces/ecpg/lib/ecpglib.c
+++ b/src/interfaces/ecpg/lib/ecpglib.c
@@ -395,7 +395,7 @@ ECPGexecute(struct statement * stmt)
{
bool status = false;
char *copiedquery;
- PGresult *results;
+ PGresult *results, *query;
PGnotify *notify;
struct variable *var;
@@ -669,7 +669,8 @@ ECPGexecute(struct statement * stmt)
{
char *pval;
char *scan_length;
-
+ char *array_query;
+
if (var == NULL)
{
ECPGlog("ECPGexecute line %d: Too few arguments.\n", stmt->lineno);
@@ -724,10 +725,15 @@ ECPGexecute(struct statement * stmt)
*((void **) var->pointer) = var->value;
add_mem(var->value, stmt->lineno);
}
-
-
- ECPGlog("ECPGexecute line %d: TYPE db: %d c: %d\n", stmt->lineno, PQftype(results, act_field), var->type);
-
+
+#if 0
+ array_query = (char *)ecpg_alloc(strlen("select typelem from pg_type where oid=") + 11, stmt -> lineno);
+ sprintf(array_query, "select typelem from pg_type where oid=%d", PQftype(results, act_field));
+ query = PQexec(stmt->connection->connection, array_query);
+ if (PQresultStatus(query) == PGRES_TUPLES_OK)
+ ECPGlog("ECPGexecute line %d: TYPE database: %d C: %d array OID: %s\n", stmt->lineno, PQftype(results, act_field), var->type, (char *)PQgetvalue(query, 0, 0));
+ PQclear(query);
+#endif
for (act_tuple = 0; act_tuple < ntuples && status; act_tuple++)
{
pval = (char *)PQgetvalue(results, act_tuple, act_field);