Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8b4ff8b

Browse files
committed
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".
1 parent baaec74 commit 8b4ff8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+274
-274
lines changed

contrib/spi/autoinc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ autoinc(PG_FUNCTION_ARGS)
3131
elog(ERROR, "not fired by trigger manager");
3232
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
3333
/* internal error */
34-
elog(ERROR, "can't process STATEMENT events");
34+
elog(ERROR, "cannot process STATEMENT events");
3535
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
3636
/* internal error */
3737
elog(ERROR, "must be fired before event");
@@ -42,7 +42,7 @@ autoinc(PG_FUNCTION_ARGS)
4242
rettuple = trigdata->tg_newtuple;
4343
else
4444
/* internal error */
45-
elog(ERROR, "can't process DELETE events");
45+
elog(ERROR, "cannot process DELETE events");
4646

4747
rel = trigdata->tg_relation;
4848
relname = SPI_getrelname(rel);

contrib/spi/insert_username.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* insert_username.c
33
* $Modified: Thu Oct 16 08:13:42 1997 by brook $
4-
* $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.14 2006/05/30 22:12:13 tgl Exp $
4+
* $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.15 2007/02/01 19:10:23 momjian Exp $
55
*
66
* insert user name in response to a trigger
77
* usage: insert_username (column_name)
@@ -37,7 +37,7 @@ insert_username(PG_FUNCTION_ARGS)
3737
elog(ERROR, "insert_username: not fired by trigger manager");
3838
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
3939
/* internal error */
40-
elog(ERROR, "insert_username: can't process STATEMENT events");
40+
elog(ERROR, "insert_username: cannot process STATEMENT events");
4141
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
4242
/* internal error */
4343
elog(ERROR, "insert_username: must be fired before event");
@@ -48,7 +48,7 @@ insert_username(PG_FUNCTION_ARGS)
4848
rettuple = trigdata->tg_newtuple;
4949
else
5050
/* internal error */
51-
elog(ERROR, "insert_username: can't process DELETE events");
51+
elog(ERROR, "insert_username: cannot process DELETE events");
5252

5353
rel = trigdata->tg_relation;
5454
relname = SPI_getrelname(rel);

contrib/spi/moddatetime.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
moddatetime.c
33
4-
$PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.13 2006/05/30 22:12:13 tgl Exp $
4+
$PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.14 2007/02/01 19:10:23 momjian Exp $
55
66
What is this?
77
It is a function to be called from a trigger for the purpose of updating
@@ -43,7 +43,7 @@ moddatetime(PG_FUNCTION_ARGS)
4343

4444
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
4545
/* internal error */
46-
elog(ERROR, "moddatetime: can't process STATEMENT events");
46+
elog(ERROR, "moddatetime: cannot process STATEMENT events");
4747

4848
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
4949
/* internal error */
@@ -56,7 +56,7 @@ moddatetime(PG_FUNCTION_ARGS)
5656
rettuple = trigdata->tg_newtuple;
5757
else
5858
/* internal error */
59-
elog(ERROR, "moddatetime: can't process DELETE events");
59+
elog(ERROR, "moddatetime: cannot process DELETE events");
6060

6161
rel = trigdata->tg_relation;
6262
relname = SPI_getrelname(rel);

contrib/spi/refint.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ check_primary_key(PG_FUNCTION_ARGS)
7777
/* Should be called for ROW trigger */
7878
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
7979
/* internal error */
80-
elog(ERROR, "check_primary_key: can't process STATEMENT events");
80+
elog(ERROR, "check_primary_key: cannot process STATEMENT events");
8181

8282
/* If INSERTion then must check Tuple to being inserted */
8383
if (TRIGGER_FIRED_BY_INSERT(trigdata->tg_event))
@@ -86,7 +86,7 @@ check_primary_key(PG_FUNCTION_ARGS)
8686
/* Not should be called for DELETE */
8787
else if (TRIGGER_FIRED_BY_DELETE(trigdata->tg_event))
8888
/* internal error */
89-
elog(ERROR, "check_primary_key: can't process DELETE events");
89+
elog(ERROR, "check_primary_key: cannot process DELETE events");
9090

9191
/* If UPDATion the must check new Tuple, not old one */
9292
else
@@ -277,12 +277,12 @@ check_foreign_key(PG_FUNCTION_ARGS)
277277
/* Should be called for ROW trigger */
278278
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
279279
/* internal error */
280-
elog(ERROR, "check_foreign_key: can't process STATEMENT events");
280+
elog(ERROR, "check_foreign_key: cannot process STATEMENT events");
281281

282282
/* Not should be called for INSERT */
283283
if (TRIGGER_FIRED_BY_INSERT(trigdata->tg_event))
284284
/* internal error */
285-
elog(ERROR, "check_foreign_key: can't process INSERT events");
285+
elog(ERROR, "check_foreign_key: cannot process INSERT events");
286286

287287
/* Have to check tg_trigtuple - tuple being deleted */
288288
trigtuple = trigdata->tg_trigtuple;

contrib/spi/timetravel.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ timetravel(PG_FUNCTION_ARGS)
115115

116116
/* Should be called for ROW trigger */
117117
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
118-
elog(ERROR, "timetravel: can't process STATEMENT events");
118+
elog(ERROR, "timetravel: cannot process STATEMENT events");
119119

120120
/* Should be called BEFORE */
121121
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
@@ -261,7 +261,7 @@ timetravel(PG_FUNCTION_ARGS)
261261
elog(ERROR, "timetravel (%s): %s must be NOT NULL", relname, args[a_time_off]);
262262

263263
if (oldtimeon != newtimeon || oldtimeoff != newtimeoff)
264-
elog(ERROR, "timetravel (%s): you can't change %s and/or %s columns (use set_timetravel)",
264+
elog(ERROR, "timetravel (%s): you cannot change %s and/or %s columns (use set_timetravel)",
265265
relname, args[a_time_on], args[a_time_off]);
266266
}
267267
if (oldtimeoff != NOEND_ABSTIME)

contrib/tsearch2/dict_thesaurus.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.7 2006/12/26 14:54:24 teodor Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.8 2007/02/01 19:10:23 momjian Exp $ */
22

33
/*
44
* thesaurus
@@ -186,7 +186,7 @@ thesaurusRead(char *filename, DictThesaurus * d)
186186

187187
fh = fopen(to_absfilename(filename), "r");
188188
if (!fh)
189-
elog(ERROR, "Thesaurus: can't open '%s' file", filename);
189+
elog(ERROR, "Thesaurus: cannot open '%s' file", filename);
190190

191191
while (fgets(str, sizeof(str), fh))
192192
{

contrib/tsearch2/tsvector.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ tsearch2(PG_FUNCTION_ARGS)
859859
trigdata = (TriggerData *) fcinfo->context;
860860
if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
861861
/* internal error */
862-
elog(ERROR, "TSearch: Can't process STATEMENT events");
862+
elog(ERROR, "TSearch: Cannot process STATEMENT events");
863863
if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
864864
/* internal error */
865865
elog(ERROR, "TSearch: Must be fired BEFORE event");

doc/src/sgml/ecpg.sgml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.79 2007/02/01 00:28:16 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.80 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="ecpg">
44
<title><application>ECPG</application> - Embedded <acronym>SQL</acronym> in C</title>
@@ -522,7 +522,7 @@ EXEC SQL TYPE serial_t IS long;
522522
<listitem>
523523
<para>
524524
You can declare pointers to the most common types. Note however that
525-
you can not use pointers as target variables of queries without
525+
you cannot use pointers as target variables of queries without
526526
auto-allocation. See <xref linkend="ecpg-descriptors"> for more
527527
information on auto-allocation.
528528
</para>
@@ -1084,7 +1084,7 @@ int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst);
10841084
<literal>src</> points to into the numeric variable that
10851085
<literal>dst</> points to. It returns 0 on success and -1 if an error
10861086
occurs. Since the decimal type is implemented as a limited version of
1087-
the numeric type, overflow can not occur with this conversion.
1087+
the numeric type, overflow cannot occur with this conversion.
10881088
</para>
10891089
</listitem>
10901090
</varlistentry>
@@ -4548,7 +4548,7 @@ EXEC SQL DEFINE MYNUMBER 12;
45484548
EXEC SQL UPDATE Tbl SET col = MYNUMBER;
45494549
</programlisting>
45504550
then ecpg will already do the substitution and your C compiler will never
4551-
see any name or identifier <literal>MYNUMBER</>. Note that you can not use
4551+
see any name or identifier <literal>MYNUMBER</>. Note that you cannot use
45524552
<literal>#define</literal> for a constant that you are going to use in an
45534553
embedded SQL query because in this case the embedded SQL precompiler is not
45544554
able to see this declaration.

doc/src/sgml/gin.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.9 2007/01/31 20:56:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.10 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="GIN">
44
<title>GIN Indexes</title>
@@ -209,7 +209,7 @@
209209
<acronym>GIN</acronym> will emit an error. Depending on the operator,
210210
a void query might match all, some, or none of the indexed values (for
211211
example, every array contains the empty array, but does not overlap the
212-
empty array), and <acronym>GIN</acronym> can't determine the correct
212+
empty array), and <acronym>GIN</acronym> cannot determine the correct
213213
answer, nor produce a full-index-scan result if it could determine that
214214
that was correct.
215215
</para>

doc/src/sgml/installation.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.280 2007/02/01 00:28:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.281 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1040,7 +1040,7 @@ su - postgres
10401040
<listitem>
10411041
<para>
10421042
Enables <firstterm>assertion</> checks in the server, which test for
1043-
many <quote>can't happen</> conditions. This is invaluable for
1043+
many <quote>cannot happen</> conditions. This is invaluable for
10441044
code development purposes, but the tests slow things down a little.
10451045
Also, having the tests turned on won't necessarily enhance the
10461046
stability of your server! The assertion checks are not categorized

doc/src/sgml/lobj.sgml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/lobj.sgml,v 1.43 2007/01/31 20:56:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/lobj.sgml,v 1.44 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="largeObjects">
44
<title id="largeObjects-title">Large Objects</title>
@@ -437,15 +437,15 @@ importFile(PGconn *conn, char *filename)
437437
fd = open(filename, O_RDONLY, 0666);
438438
if (fd &lt; 0)
439439
{ /* error */
440-
fprintf(stderr, &quot;can't open unix file %s\n&quot;, filename);
440+
fprintf(stderr, &quot;cannot open unix file %s\n&quot;, filename);
441441
}
442442

443443
/*
444444
* create the large object
445445
*/
446446
lobjId = lo_creat(conn, INV_READ | INV_WRITE);
447447
if (lobjId == 0)
448-
fprintf(stderr, &quot;can't create large object\n&quot;);
448+
fprintf(stderr, &quot;cannot create large object\n&quot;);
449449

450450
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
451451

@@ -476,7 +476,7 @@ pickout(PGconn *conn, Oid lobjId, int start, int len)
476476
lobj_fd = lo_open(conn, lobjId, INV_READ);
477477
if (lobj_fd &lt; 0)
478478
{
479-
fprintf(stderr, &quot;can't open large object %d\n&quot;,
479+
fprintf(stderr, &quot;cannot open large object %d\n&quot;,
480480
lobjId);
481481
}
482482

@@ -508,7 +508,7 @@ overwrite(PGconn *conn, Oid lobjId, int start, int len)
508508
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
509509
if (lobj_fd &lt; 0)
510510
{
511-
fprintf(stderr, &quot;can't open large object %d\n&quot;,
511+
fprintf(stderr, &quot;cannot open large object %d\n&quot;,
512512
lobjId);
513513
}
514514

@@ -550,7 +550,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
550550
lobj_fd = lo_open(conn, lobjId, INV_READ);
551551
if (lobj_fd &lt; 0)
552552
{
553-
fprintf(stderr, &quot;can't open large object %d\n&quot;,
553+
fprintf(stderr, &quot;cannot open large object %d\n&quot;,
554554
lobjId);
555555
}
556556

@@ -560,7 +560,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
560560
fd = open(filename, O_CREAT | O_WRONLY, 0666);
561561
if (fd &lt; 0)
562562
{ /* error */
563-
fprintf(stderr, &quot;can't open unix file %s\n&quot;,
563+
fprintf(stderr, &quot;cannot open unix file %s\n&quot;,
564564
filename);
565565
}
566566

doc/src/sgml/maintenance.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.69 2007/02/01 00:28:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.70 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="maintenance">
44
<title>Routine Database Maintenance Tasks</title>
@@ -296,7 +296,7 @@
296296
wraparound</>: the XID counter wraps around to zero, and all of a sudden
297297
transactions that were in the past appear to be in the future &mdash; which
298298
means their outputs become invisible. In short, catastrophic data loss.
299-
(Actually the data is still there, but that's cold comfort if you can't
299+
(Actually the data is still there, but that's cold comfort if you cannot
300300
get at it.) To avoid this, it is necessary to vacuum every table
301301
in every database at least once every two billion transactions.
302302
</para>

doc/src/sgml/perform.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.62 2007/02/01 00:28:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.63 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="performance-tips">
44
<title>Performance Tips</title>
@@ -437,7 +437,7 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 &lt; 100 AND t
437437
<para>
438438
It is worth noting that <command>EXPLAIN</> results should not be extrapolated
439439
to situations other than the one you are actually testing; for example,
440-
results on a toy-sized table can't be assumed to apply to large tables.
440+
results on a toy-sized table cannot be assumed to apply to large tables.
441441
The planner's cost estimates are not linear and so it might choose
442442
a different plan for a larger or smaller table. An extreme example
443443
is that on a table that only occupies one disk page, you'll nearly

doc/src/sgml/plperl.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.62 2007/02/01 00:28:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.63 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="plperl">
44
<title>PL/Perl - Perl Procedural Language</title>
@@ -397,7 +397,7 @@ CREATE OR REPLACE FUNCTION lotsa_md5 (INTEGER) RETURNS SETOF foo_type AS $$
397397
my $t = localtime;
398398
elog(NOTICE, "opening file $file at $t" );
399399
open my $fh, '&lt;', $file # ooh, it's a file access!
400-
or elog(ERROR, "can't open $file for reading: $!");
400+
or elog(ERROR, "cannot open $file for reading: $!");
401401
my @words = &lt;$fh&gt;;
402402
close $fh;
403403
$t = localtime;
@@ -541,7 +541,7 @@ CREATE OR REPLACE FUNCTION set_var(name text, val text) RETURNS text AS $$
541541
if ($_SHARED{$_[0]} = $_[1]) {
542542
return 'ok';
543543
} else {
544-
return "can't set shared variable $_[0] to $_[1]";
544+
return "cannot set shared variable $_[0] to $_[1]";
545545
}
546546
$$ LANGUAGE plperl;
547547

doc/src/sgml/queries.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/queries.sgml,v 1.43 2007/02/01 00:28:17 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/queries.sgml,v 1.44 2007/02/01 19:10:24 momjian Exp $ -->
22

33
<chapter id="queries">
44
<title>Queries</title>
@@ -591,7 +591,7 @@ FROM (SELECT * FROM table1) AS alias_name
591591

592592
<para>
593593
This example is equivalent to <literal>FROM table1 AS
594-
alias_name</literal>. More interesting cases, which can't be
594+
alias_name</literal>. More interesting cases, which cannot be
595595
reduced to a plain join, arise when the subquery involves
596596
grouping or aggregation.
597597
</para>

doc/src/sgml/ref/create_function.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.72 2007/01/31 23:26:03 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.73 2007/02/01 19:10:24 momjian Exp $
33
-->
44

55
<refentry id="SQL-CREATEFUNCTION">
@@ -61,7 +61,7 @@ CREATE [ OR REPLACE ] FUNCTION
6161
Also, <command>CREATE OR REPLACE FUNCTION</command> will not let
6262
you change the return type of an existing function. To do that,
6363
you must drop and recreate the function. (When using <literal>OUT</>
64-
parameters, that means you can't change the names or types of any
64+
parameters, that means you cannot change the names or types of any
6565
<literal>OUT</> parameters except by dropping the function.)
6666
</para>
6767

doc/src/sgml/ref/create_rule.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.50 2007/02/01 00:28:18 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.51 2007/02/01 19:10:24 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -138,7 +138,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
138138
Any <acronym>SQL</acronym> conditional expression (returning
139139
<type>boolean</type>). The condition expression cannot refer
140140
to any tables except <literal>NEW</> and <literal>OLD</>, and
141-
can not contain aggregate functions.
141+
cannot contain aggregate functions.
142142
</para>
143143
</listitem>
144144
</varlistentry>

doc/src/sgml/ref/create_trigger.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.46 2007/01/31 23:26:03 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.47 2007/02/01 19:10:24 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -71,7 +71,7 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
7171
</para>
7272

7373
<para>
74-
<command>SELECT</command> does not modify any rows so you can not
74+
<command>SELECT</command> does not modify any rows so you cannot
7575
create <command>SELECT</command> triggers. Rules and views are more
7676
appropriate in such cases.
7777
</para>

0 commit comments

Comments
 (0)