1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Improve declare/fetch mode a little.

Add a new DSN option for PREPARE hadling.

Hiroshi Inoue
This commit is contained in:
Hiroshi Inoue
2001-09-08 16:20:16 +00:00
parent fc5ec424ab
commit ec6c4d8c82
12 changed files with 72 additions and 35 deletions

View File

@ -340,8 +340,12 @@ PGAPI_Execute(
return retval;
mylog(" stmt_with_params = '%s'\n", stmt->stmt_with_params);
#ifdef PREPARE_TRIAL
if (stmt->inaccurate_result)
/*
* Get the field info for the prepared
* query using dummy backward fetch.
*/
if (stmt->inaccurate_result && conn->connInfo.disallow_premature)
{
if (SC_is_pre_executable(stmt))
{
BOOL in_trans = CC_is_in_trans(conn);
@ -365,7 +369,8 @@ PGAPI_Execute(
}
else
return SQL_SUCCESS;
#endif /* PREPARE_TRIAL */
}
return SC_execute(stmt);
}