summaryrefslogtreecommitdiff
path: root/src/backend/executor/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/spi.c')
-rw-r--r--src/backend/executor/spi.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index f750560c6f4..40f43ee011b 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.207 2009/01/21 11:02:40 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.208 2009/06/11 14:48:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,11 +45,11 @@ static int _SPI_connected = -1;
static int _SPI_curid = -1;
static Portal SPI_cursor_open_internal(const char *name, SPIPlanPtr plan,
- Datum *Values, const char *Nulls,
- bool read_only, int pflags);
+ Datum *Values, const char *Nulls,
+ bool read_only, int pflags);
static void _SPI_prepare_plan(const char *src, SPIPlanPtr plan,
- ParamListInfo boundParams);
+ ParamListInfo boundParams);
static int _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
Snapshot snapshot, Snapshot crosscheck_snapshot,
@@ -308,7 +308,7 @@ SPI_pop(void)
bool
SPI_push_conditional(void)
{
- bool pushed = (_SPI_curid != _SPI_connected);
+ bool pushed = (_SPI_curid != _SPI_connected);
if (pushed)
{
@@ -962,7 +962,7 @@ SPI_cursor_open(const char *name, SPIPlanPtr plan,
/*
* SPI_cursor_open_with_args()
*
- * Parse and plan a query and open it as a portal. Like SPI_execute_with_args,
+ * Parse and plan a query and open it as a portal. Like SPI_execute_with_args,
* we can tell the planner to rely on the parameter values as constants,
* because the plan will only be used once.
*/
@@ -1212,8 +1212,8 @@ SPI_cursor_open_internal(const char *name, SPIPlanPtr plan,
}
/*
- * Set up the snapshot to use. (PortalStart will do PushActiveSnapshot, so
- * we skip that here.)
+ * Set up the snapshot to use. (PortalStart will do PushActiveSnapshot,
+ * so we skip that here.)
*/
if (read_only)
snapshot = GetActiveSnapshot();
@@ -1767,13 +1767,13 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
if (read_only && !CommandIsReadOnly(stmt))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- /* translator: %s is a SQL statement name */
- errmsg("%s is not allowed in a non-volatile function",
- CreateCommandTag(stmt))));
+ /* translator: %s is a SQL statement name */
+ errmsg("%s is not allowed in a non-volatile function",
+ CreateCommandTag(stmt))));
/*
- * If not read-only mode, advance the command counter before
- * each command.
+ * If not read-only mode, advance the command counter before each
+ * command.
*/
if (!read_only)
CommandCounterIncrement();
@@ -1784,7 +1784,8 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
{
/*
* Default read_only behavior is to use the entry-time
- * ActiveSnapshot, if any; if read-write, grab a full new snap.
+ * ActiveSnapshot, if any; if read-write, grab a full new
+ * snap.
*/
if (read_only)
{
@@ -1804,8 +1805,8 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
{
/*
* We interpret read_only with a specified snapshot to be
- * exactly that snapshot, but read-write means use the
- * snap with advancing of command ID.
+ * exactly that snapshot, but read-write means use the snap
+ * with advancing of command ID.
*/
if (read_only)
PushActiveSnapshot(snapshot);
@@ -1839,7 +1840,7 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
ProcessUtility(stmt,
plansource->query_string,
paramLI,
- false, /* not top level */
+ false, /* not top level */
dest,
NULL);
/* Update "processed" if stmt returned tuples */
@@ -1853,9 +1854,9 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
PopActiveSnapshot();
/*
- * The last canSetTag query sets the status values returned to
- * the caller. Be careful to free any tuptables not returned,
- * to avoid intratransaction memory leak.
+ * The last canSetTag query sets the status values returned to the
+ * caller. Be careful to free any tuptables not returned, to
+ * avoid intratransaction memory leak.
*/
if (canSetTag)
{
@@ -1884,9 +1885,9 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
cplan = NULL;
/*
- * If not read-only mode, advance the command counter after the
- * last command. This ensures that its effects are visible, in
- * case it was DDL that would affect the next CachedPlanSource.
+ * If not read-only mode, advance the command counter after the last
+ * command. This ensures that its effects are visible, in case it was
+ * DDL that would affect the next CachedPlanSource.
*/
if (!read_only)
CommandCounterIncrement();
@@ -1912,9 +1913,9 @@ fail:
_SPI_current->tuptable = NULL;
/*
- * If none of the queries had canSetTag, return SPI_OK_REWRITTEN. Prior
- * to 8.4, we used return the last query's result code, but not its
- * auxiliary results, but that's confusing.
+ * If none of the queries had canSetTag, return SPI_OK_REWRITTEN. Prior to
+ * 8.4, we used return the last query's result code, but not its auxiliary
+ * results, but that's confusing.
*/
if (my_res == 0)
my_res = SPI_OK_REWRITTEN;
@@ -1938,7 +1939,7 @@ _SPI_convert_params(int nargs, Oid *argtypes,
/* sizeof(ParamListInfoData) includes the first array element */
paramLI = (ParamListInfo) palloc(sizeof(ParamListInfoData) +
- (nargs - 1) *sizeof(ParamExternData));
+ (nargs - 1) *sizeof(ParamExternData));
paramLI->numParams = nargs;
for (i = 0; i < nargs; i++)