88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.233 2009/02/17 12:51:59 petere Exp $
11+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.234 2009/02/18 11:33:04 petere Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -706,7 +706,7 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
706706 {
707707 validate_tupdesc_compat (trigdata -> tg_relation -> rd_att ,
708708 estate .rettupdesc ,
709- "returned tuple structure does not match table of trigger event " );
709+ "returned row structure does not match the structure of the triggering table " );
710710 /* Copy tuple to upper executor memory */
711711 rettup = SPI_copytuple ((HeapTuple ) DatumGetPointer (estate .retval ));
712712 }
@@ -765,24 +765,18 @@ plpgsql_exec_error_callback(void *arg)
765765 */
766766 if (estate -> err_stmt != NULL )
767767 {
768- /*
769- * translator: last %s is a phrase such as "during statement block
770- * local variable initialization"
771- */
768+ /* translator: last %s is a phrase such as "during statement block local variable initialization" */
772769 errcontext ("PL/pgSQL function \"%s\" line %d %s" ,
773770 estate -> err_func -> fn_name ,
774771 estate -> err_stmt -> lineno ,
775- gettext (estate -> err_text ));
772+ _ (estate -> err_text ));
776773 }
777774 else
778775 {
779- /*
780- * translator: last %s is a phrase such as "while storing call
781- * arguments into local variables"
782- */
776+ /* translator: last %s is a phrase such as "while storing call arguments into local variables" */
783777 errcontext ("PL/pgSQL function \"%s\" %s" ,
784778 estate -> err_func -> fn_name ,
785- gettext (estate -> err_text ));
779+ _ (estate -> err_text ));
786780 }
787781 }
788782 else if (estate -> err_stmt != NULL )
@@ -1677,7 +1671,7 @@ exec_stmt_fori(PLpgSQL_execstate *estate, PLpgSQL_stmt_fori *stmt)
16771671 if (isnull )
16781672 ereport (ERROR ,
16791673 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
1680- errmsg ("lower bound of FOR loop cannot be NULL " )));
1674+ errmsg ("lower bound of FOR loop cannot be null " )));
16811675 loop_value = DatumGetInt32 (value );
16821676 exec_eval_cleanup (estate );
16831677
@@ -1692,7 +1686,7 @@ exec_stmt_fori(PLpgSQL_execstate *estate, PLpgSQL_stmt_fori *stmt)
16921686 if (isnull )
16931687 ereport (ERROR ,
16941688 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
1695- errmsg ("upper bound of FOR loop cannot be NULL " )));
1689+ errmsg ("upper bound of FOR loop cannot be null " )));
16961690 end_value = DatumGetInt32 (value );
16971691 exec_eval_cleanup (estate );
16981692
@@ -1709,7 +1703,7 @@ exec_stmt_fori(PLpgSQL_execstate *estate, PLpgSQL_stmt_fori *stmt)
17091703 if (isnull )
17101704 ereport (ERROR ,
17111705 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
1712- errmsg ("BY value of FOR loop cannot be NULL " )));
1706+ errmsg ("BY value of FOR loop cannot be null " )));
17131707 step_value = DatumGetInt32 (value );
17141708 exec_eval_cleanup (estate );
17151709 if (step_value <= 0 )
@@ -2470,7 +2464,7 @@ exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
24702464 if (optionisnull )
24712465 ereport (ERROR ,
24722466 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
2473- errmsg ("RAISE statement option cannot be NULL " )));
2467+ errmsg ("RAISE statement option cannot be null " )));
24742468
24752469 extval = convert_value_to_string (optionvalue , optiontypeid );
24762470
@@ -2916,7 +2910,7 @@ exec_stmt_dynexecute(PLpgSQL_execstate *estate,
29162910 if (isnull )
29172911 ereport (ERROR ,
29182912 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
2919- errmsg ("cannot EXECUTE a null querystring " )));
2913+ errmsg ("query string argument of EXECUTE is null" )));
29202914
29212915 /* Get the C-String representation */
29222916 querystr = convert_value_to_string (query , restype );
@@ -2981,7 +2975,7 @@ exec_stmt_dynexecute(PLpgSQL_execstate *estate,
29812975 if (* ptr == 'S' || * ptr == 's' )
29822976 ereport (ERROR ,
29832977 (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
2984- errmsg ("EXECUTE of SELECT ... INTO is not implemented yet " )));
2978+ errmsg ("EXECUTE of SELECT ... INTO is not implemented" )));
29852979 break ;
29862980 }
29872981
@@ -3166,7 +3160,7 @@ exec_stmt_open(PLpgSQL_execstate *estate, PLpgSQL_stmt_open *stmt)
31663160 if (isnull )
31673161 ereport (ERROR ,
31683162 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
3169- errmsg ("cannot EXECUTE a null querystring " )));
3163+ errmsg ("query string argument of EXECUTE is null" )));
31703164
31713165 /* Get the C-String representation */
31723166 querystr = convert_value_to_string (queryD , restype );
@@ -3300,7 +3294,7 @@ exec_stmt_fetch(PLpgSQL_execstate *estate, PLpgSQL_stmt_fetch *stmt)
33003294 if (curvar -> isnull )
33013295 ereport (ERROR ,
33023296 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
3303- errmsg ("cursor variable \"%s\" is NULL " , curvar -> refname )));
3297+ errmsg ("cursor variable \"%s\" is null " , curvar -> refname )));
33043298 curname = TextDatumGetCString (curvar -> value );
33053299
33063300 portal = SPI_cursor_find (curname );
@@ -3321,7 +3315,7 @@ exec_stmt_fetch(PLpgSQL_execstate *estate, PLpgSQL_stmt_fetch *stmt)
33213315 if (isnull )
33223316 ereport (ERROR ,
33233317 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
3324- errmsg ("relative or absolute cursor position is NULL " )));
3318+ errmsg ("relative or absolute cursor position is null " )));
33253319
33263320 exec_eval_cleanup (estate );
33273321 }
@@ -3396,7 +3390,7 @@ exec_stmt_close(PLpgSQL_execstate *estate, PLpgSQL_stmt_close *stmt)
33963390 if (curvar -> isnull )
33973391 ereport (ERROR ,
33983392 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
3399- errmsg ("cursor variable \"%s\" is NULL " , curvar -> refname )));
3393+ errmsg ("cursor variable \"%s\" is null " , curvar -> refname )));
34003394 curname = TextDatumGetCString (curvar -> value );
34013395
34023396 portal = SPI_cursor_find (curname );
@@ -3463,7 +3457,7 @@ exec_assign_value(PLpgSQL_execstate *estate,
34633457 if (* isNull && var -> notnull )
34643458 ereport (ERROR ,
34653459 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
3466- errmsg ("NULL cannot be assigned to variable \"%s\" declared NOT NULL" ,
3460+ errmsg ("null value cannot be assigned to variable \"%s\" declared NOT NULL" ,
34673461 var -> refname )));
34683462
34693463 /*
@@ -3720,8 +3714,8 @@ exec_assign_value(PLpgSQL_execstate *estate,
37203714 if (nsubscripts >= MAXDIM )
37213715 ereport (ERROR ,
37223716 (errcode (ERRCODE_PROGRAM_LIMIT_EXCEEDED ),
3723- errmsg ("number of array dimensions exceeds the maximum allowed, %d " ,
3724- MAXDIM )));
3717+ errmsg ("number of array dimensions (%d) exceeds the maximum allowed (%d) " ,
3718+ nsubscripts , MAXDIM )));
37253719 subscripts [nsubscripts ++ ] = arrayelem -> subscript ;
37263720 target = estate -> datums [arrayelem -> arrayparentno ];
37273721 } while (target -> dtype == PLPGSQL_DTYPE_ARRAYELEM );
@@ -3757,7 +3751,7 @@ exec_assign_value(PLpgSQL_execstate *estate,
37573751 if (subisnull )
37583752 ereport (ERROR ,
37593753 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
3760- errmsg ("array subscript in assignment must not be NULL " )));
3754+ errmsg ("array subscript in assignment must not be null " )));
37613755 }
37623756
37633757 /* Coerce source value to match array element type. */
@@ -5129,7 +5123,7 @@ static void
51295123validate_tupdesc_compat (TupleDesc expected , TupleDesc returned , const char * msg )
51305124{
51315125 int i ;
5132- const char * dropped_column_type = gettext_noop ("n/a (dropped column)" );
5126+ const char * dropped_column_type = gettext_noop ("N/A (dropped column)" );
51335127
51345128 if (!expected || !returned )
51355129 ereport (ERROR ,
@@ -5402,7 +5396,7 @@ exec_dynquery_with_params(PLpgSQL_execstate *estate, PLpgSQL_expr *dynquery,
54025396 if (isnull )
54035397 ereport (ERROR ,
54045398 (errcode (ERRCODE_NULL_VALUE_NOT_ALLOWED ),
5405- errmsg ("cannot EXECUTE a null querystring " )));
5399+ errmsg ("query string argument of EXECUTE is null" )));
54065400
54075401 /* Get the C-String representation */
54085402 querystr = convert_value_to_string (query , restype );
0 commit comments