diff options
| author | Neil Conway | 2005-05-26 03:18:53 +0000 |
|---|---|---|
| committer | Neil Conway | 2005-05-26 03:18:53 +0000 |
| commit | b3195dae49b08ea2271a706f55068896322f1641 (patch) | |
| tree | c19de7a36e97e499c92003b1cfeaf6dbb2f700f3 /src/pl | |
| parent | 63e0d612f5a53d76218d4e59a35287391e284561 (diff) | |
Minor cleanup for recent SQLSTATE / SQLERRM patch: spell "successful"
correctly, style fixes.
Diffstat (limited to 'src/pl')
| -rw-r--r-- | src/pl/plpgsql/src/gram.y | 5 | ||||
| -rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 13 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y index d4a535d548b..39a7a01bebe 100644 --- a/src/pl/plpgsql/src/gram.y +++ b/src/pl/plpgsql/src/gram.y @@ -4,7 +4,7 @@ * procedural language * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.70 2005/05/26 00:16:31 momjian Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.71 2005/05/26 03:18:53 neilc Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -285,7 +285,8 @@ fict_vars_sect : plpgsql_build_datatype(TEXTOID, -1), true); $$.sqlerrm_varno = var->dno; plpgsql_add_initdatums(NULL); - }; + } + ; decl_sect : opt_label { diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 333ca21c0ba..c602da21601 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.139 2005/05/26 00:16:31 momjian Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.140 2005/05/26 03:18:53 neilc Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -760,7 +760,7 @@ exec_stmt_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block) var = (PLpgSQL_var *) (estate->datums[block->sqlerrm_varno]); var->isnull = false; var->freeval = true; - var->value = DirectFunctionCall1(textin, CStringGetDatum("Sucessful completion")); + var->value = DirectFunctionCall1(textin, CStringGetDatum("Successful completion")); /* * First initialize all variables declared in this block @@ -777,7 +777,7 @@ exec_stmt_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block) if (var->freeval) { - pfree((void *) (var->value)); + pfree(DatumGetPointer(var->value)); var->freeval = false; } @@ -872,13 +872,12 @@ exec_stmt_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block) CurrentResourceOwner = oldowner; /* set SQLSTATE and SQLERRM variables */ - var = (PLpgSQL_var *) (estate->datums[block->sqlstate_varno]); - pfree((void *) (var->value)); + pfree(DatumGetPointer(var->value)); var->value = DirectFunctionCall1(textin, CStringGetDatum(unpack_sql_state(edata->sqlerrcode))); - + var = (PLpgSQL_var *) (estate->datums[block->sqlerrm_varno]); - pfree((void *) (var->value)); + pfree(DatumGetPointer(var->value)); var->value = DirectFunctionCall1(textin, CStringGetDatum(edata->message)); /* |
