*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/variable.c,v 1.103 2004/08/31 19:28:51 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/variable.c,v 1.104 2004/09/24 19:42:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
ereport(ERROR,
(errcode(ERRCODE_ACTIVE_SQL_TRANSACTION),
errmsg("SET TRANSACTION ISOLATION LEVEL must be called before any query")));
- else
+ /* source == PGC_S_OVERRIDE means do it anyway, eg at xact abort */
+ else if (source != PGC_S_OVERRIDE)
return NULL;
}
if (IsSubTransaction())
ereport(ERROR,
(errcode(ERRCODE_ACTIVE_SQL_TRANSACTION),
errmsg("SET TRANSACTION ISOLATION LEVEL must not be called in a subtransaction")));
- else
+ /* source == PGC_S_OVERRIDE means do it anyway, eg at xact abort */
+ else if (source != PGC_S_OVERRIDE)
return NULL;
}
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.238 2004/08/31 22:43:58 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.239 2004/09/24 19:43:03 tgl Exp $
*
*--------------------------------------------------------------------
*/
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("cannot enable parameter when \"log_statement_stats\" is true")));
- else
+ /* source == PGC_S_OVERRIDE means do it anyway, eg at xact abort */
+ else if (source != PGC_S_OVERRIDE)
return false;
}
return true;
errmsg("cannot enable \"log_statement_stats\" when "
"\"log_parser_stats\", \"log_planner_stats\", "
"or \"log_executor_stats\" is true")));
- else
+ /* source == PGC_S_OVERRIDE means do it anyway, eg at xact abort */
+ else if (source != PGC_S_OVERRIDE)
return false;
}
return true;
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("cannot set transaction read-write mode inside a read-only transaction")));
- return false;
+ /* source == PGC_S_OVERRIDE means do it anyway, eg at xact abort */
+ else if (source != PGC_S_OVERRIDE)
+ return false;
}
return true;
}