mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Wording cleanup for error messages. Also change can't -> cannot.
Standard English uses "may", "can", and "might" in different ways: may - permission, "You may borrow my rake." can - ability, "I can lift that log." might - possibility, "It might rain today." Unfortunately, in conversational English, their use is often mixed, as in, "You may use this variable to do X", when in fact, "can" is a better choice. Similarly, "It may crash" is better stated, "It might crash".
This commit is contained in:
@ -31,7 +31,7 @@ autoinc(PG_FUNCTION_ARGS)
|
||||
elog(ERROR, "not fired by trigger manager");
|
||||
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "can't process STATEMENT events");
|
||||
elog(ERROR, "cannot process STATEMENT events");
|
||||
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "must be fired before event");
|
||||
@ -42,7 +42,7 @@ autoinc(PG_FUNCTION_ARGS)
|
||||
rettuple = trigdata->tg_newtuple;
|
||||
else
|
||||
/* internal error */
|
||||
elog(ERROR, "can't process DELETE events");
|
||||
elog(ERROR, "cannot process DELETE events");
|
||||
|
||||
rel = trigdata->tg_relation;
|
||||
relname = SPI_getrelname(rel);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* insert_username.c
|
||||
* $Modified: Thu Oct 16 08:13:42 1997 by brook $
|
||||
* $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.14 2006/05/30 22:12:13 tgl Exp $
|
||||
* $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.15 2007/02/01 19:10:23 momjian Exp $
|
||||
*
|
||||
* insert user name in response to a trigger
|
||||
* usage: insert_username (column_name)
|
||||
@ -37,7 +37,7 @@ insert_username(PG_FUNCTION_ARGS)
|
||||
elog(ERROR, "insert_username: not fired by trigger manager");
|
||||
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "insert_username: can't process STATEMENT events");
|
||||
elog(ERROR, "insert_username: cannot process STATEMENT events");
|
||||
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "insert_username: must be fired before event");
|
||||
@ -48,7 +48,7 @@ insert_username(PG_FUNCTION_ARGS)
|
||||
rettuple = trigdata->tg_newtuple;
|
||||
else
|
||||
/* internal error */
|
||||
elog(ERROR, "insert_username: can't process DELETE events");
|
||||
elog(ERROR, "insert_username: cannot process DELETE events");
|
||||
|
||||
rel = trigdata->tg_relation;
|
||||
relname = SPI_getrelname(rel);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
moddatetime.c
|
||||
|
||||
$PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.13 2006/05/30 22:12:13 tgl Exp $
|
||||
$PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.14 2007/02/01 19:10:23 momjian Exp $
|
||||
|
||||
What is this?
|
||||
It is a function to be called from a trigger for the purpose of updating
|
||||
@ -43,7 +43,7 @@ moddatetime(PG_FUNCTION_ARGS)
|
||||
|
||||
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "moddatetime: can't process STATEMENT events");
|
||||
elog(ERROR, "moddatetime: cannot process STATEMENT events");
|
||||
|
||||
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
|
||||
/* internal error */
|
||||
@ -56,7 +56,7 @@ moddatetime(PG_FUNCTION_ARGS)
|
||||
rettuple = trigdata->tg_newtuple;
|
||||
else
|
||||
/* internal error */
|
||||
elog(ERROR, "moddatetime: can't process DELETE events");
|
||||
elog(ERROR, "moddatetime: cannot process DELETE events");
|
||||
|
||||
rel = trigdata->tg_relation;
|
||||
relname = SPI_getrelname(rel);
|
||||
|
@ -77,7 +77,7 @@ check_primary_key(PG_FUNCTION_ARGS)
|
||||
/* Should be called for ROW trigger */
|
||||
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "check_primary_key: can't process STATEMENT events");
|
||||
elog(ERROR, "check_primary_key: cannot process STATEMENT events");
|
||||
|
||||
/* If INSERTion then must check Tuple to being inserted */
|
||||
if (TRIGGER_FIRED_BY_INSERT(trigdata->tg_event))
|
||||
@ -86,7 +86,7 @@ check_primary_key(PG_FUNCTION_ARGS)
|
||||
/* Not should be called for DELETE */
|
||||
else if (TRIGGER_FIRED_BY_DELETE(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "check_primary_key: can't process DELETE events");
|
||||
elog(ERROR, "check_primary_key: cannot process DELETE events");
|
||||
|
||||
/* If UPDATion the must check new Tuple, not old one */
|
||||
else
|
||||
@ -277,12 +277,12 @@ check_foreign_key(PG_FUNCTION_ARGS)
|
||||
/* Should be called for ROW trigger */
|
||||
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "check_foreign_key: can't process STATEMENT events");
|
||||
elog(ERROR, "check_foreign_key: cannot process STATEMENT events");
|
||||
|
||||
/* Not should be called for INSERT */
|
||||
if (TRIGGER_FIRED_BY_INSERT(trigdata->tg_event))
|
||||
/* internal error */
|
||||
elog(ERROR, "check_foreign_key: can't process INSERT events");
|
||||
elog(ERROR, "check_foreign_key: cannot process INSERT events");
|
||||
|
||||
/* Have to check tg_trigtuple - tuple being deleted */
|
||||
trigtuple = trigdata->tg_trigtuple;
|
||||
|
@ -115,7 +115,7 @@ timetravel(PG_FUNCTION_ARGS)
|
||||
|
||||
/* Should be called for ROW trigger */
|
||||
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
|
||||
elog(ERROR, "timetravel: can't process STATEMENT events");
|
||||
elog(ERROR, "timetravel: cannot process STATEMENT events");
|
||||
|
||||
/* Should be called BEFORE */
|
||||
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
|
||||
@ -261,7 +261,7 @@ timetravel(PG_FUNCTION_ARGS)
|
||||
elog(ERROR, "timetravel (%s): %s must be NOT NULL", relname, args[a_time_off]);
|
||||
|
||||
if (oldtimeon != newtimeon || oldtimeoff != newtimeoff)
|
||||
elog(ERROR, "timetravel (%s): you can't change %s and/or %s columns (use set_timetravel)",
|
||||
elog(ERROR, "timetravel (%s): you cannot change %s and/or %s columns (use set_timetravel)",
|
||||
relname, args[a_time_on], args[a_time_off]);
|
||||
}
|
||||
if (oldtimeoff != NOEND_ABSTIME)
|
||||
|
Reference in New Issue
Block a user