1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

- Issue a warning if a cursor is declared but not opened.

- Fixed prototype for ECPGprepared_statement to not moan about "const char"
- Fixed parsing of nested structures.
- Added option to parse header files.
This commit is contained in:
Michael Meskes
2004-01-28 09:52:14 +00:00
parent 31a0f1d33b
commit 6ccfc4f430
9 changed files with 67 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.31 2004/01/07 18:56:29 neilc Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.32 2004/01/28 09:52:14 meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
@ -333,7 +333,7 @@ ECPGis_type_an_array(int type, const struct statement * stmt, const struct varia
}
PQclear(query);
ECPGtypeinfocache_push(&(stmt->connection->cache_head), type, isarray, stmt->lineno);
ECPGlog("ECPGexecute line %d: TYPE database: %d C: %d array: %d\n", stmt->lineno, type, var->type, isarray);
ECPGlog("ECPGis_type_an_array line %d: TYPE database: %d C: %d array: %d\n", stmt->lineno, type, var->type, isarray);
return isarray;
}
@ -356,7 +356,7 @@ ECPGstore_result(const PGresult *results, int act_field,
*/
if ((var->arrsize > 0 && ntuples > var->arrsize) || (var->ind_arrsize > 0 && ntuples > var->ind_arrsize))
{
ECPGlog("ECPGexecute line %d: Incorrect number of matches: %d don't fit into array of %d\n",
ECPGlog("ECPGstore_result line %d: Incorrect number of matches: %d don't fit into array of %d\n",
stmt->lineno, ntuples, var->arrsize);
ECPGraise(stmt->lineno, INFORMIX_MODE(stmt->compat)?ECPG_INFORMIX_SUBSELECT_NOT_ONE:ECPG_TOO_MANY_MATCHES, ECPG_SQLSTATE_CARDINALITY_VIOLATION, NULL);
return false;