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:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.79 2007/02/01 00:28:16 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/ecpg.sgml,v 1.80 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="ecpg">
|
||||
<title><application>ECPG</application> - Embedded <acronym>SQL</acronym> in C</title>
|
||||
@ -522,7 +522,7 @@ EXEC SQL TYPE serial_t IS long;
|
||||
<listitem>
|
||||
<para>
|
||||
You can declare pointers to the most common types. Note however that
|
||||
you can not use pointers as target variables of queries without
|
||||
you cannot use pointers as target variables of queries without
|
||||
auto-allocation. See <xref linkend="ecpg-descriptors"> for more
|
||||
information on auto-allocation.
|
||||
</para>
|
||||
@ -1084,7 +1084,7 @@ int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst);
|
||||
<literal>src</> points to into the numeric variable that
|
||||
<literal>dst</> points to. It returns 0 on success and -1 if an error
|
||||
occurs. Since the decimal type is implemented as a limited version of
|
||||
the numeric type, overflow can not occur with this conversion.
|
||||
the numeric type, overflow cannot occur with this conversion.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -4548,7 +4548,7 @@ EXEC SQL DEFINE MYNUMBER 12;
|
||||
EXEC SQL UPDATE Tbl SET col = MYNUMBER;
|
||||
</programlisting>
|
||||
then ecpg will already do the substitution and your C compiler will never
|
||||
see any name or identifier <literal>MYNUMBER</>. Note that you can not use
|
||||
see any name or identifier <literal>MYNUMBER</>. Note that you cannot use
|
||||
<literal>#define</literal> for a constant that you are going to use in an
|
||||
embedded SQL query because in this case the embedded SQL precompiler is not
|
||||
able to see this declaration.
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.9 2007/01/31 20:56:17 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.10 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="GIN">
|
||||
<title>GIN Indexes</title>
|
||||
@ -209,7 +209,7 @@
|
||||
<acronym>GIN</acronym> will emit an error. Depending on the operator,
|
||||
a void query might match all, some, or none of the indexed values (for
|
||||
example, every array contains the empty array, but does not overlap the
|
||||
empty array), and <acronym>GIN</acronym> can't determine the correct
|
||||
empty array), and <acronym>GIN</acronym> cannot determine the correct
|
||||
answer, nor produce a full-index-scan result if it could determine that
|
||||
that was correct.
|
||||
</para>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.280 2007/02/01 00:28:17 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.281 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="installation">
|
||||
<title><![%standalone-include[<productname>PostgreSQL</>]]>
|
||||
@ -1040,7 +1040,7 @@ su - postgres
|
||||
<listitem>
|
||||
<para>
|
||||
Enables <firstterm>assertion</> checks in the server, which test for
|
||||
many <quote>can't happen</> conditions. This is invaluable for
|
||||
many <quote>cannot happen</> conditions. This is invaluable for
|
||||
code development purposes, but the tests slow things down a little.
|
||||
Also, having the tests turned on won't necessarily enhance the
|
||||
stability of your server! The assertion checks are not categorized
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/lobj.sgml,v 1.43 2007/01/31 20:56:17 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/lobj.sgml,v 1.44 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="largeObjects">
|
||||
<title id="largeObjects-title">Large Objects</title>
|
||||
@ -437,7 +437,7 @@ importFile(PGconn *conn, char *filename)
|
||||
fd = open(filename, O_RDONLY, 0666);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
fprintf(stderr, "can't open unix file %s\n", filename);
|
||||
fprintf(stderr, "cannot open unix file %s\n", filename);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -445,7 +445,7 @@ importFile(PGconn *conn, char *filename)
|
||||
*/
|
||||
lobjId = lo_creat(conn, INV_READ | INV_WRITE);
|
||||
if (lobjId == 0)
|
||||
fprintf(stderr, "can't create large object\n");
|
||||
fprintf(stderr, "cannot create large object\n");
|
||||
|
||||
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
|
||||
|
||||
@ -476,7 +476,7 @@ pickout(PGconn *conn, Oid lobjId, int start, int len)
|
||||
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
||||
if (lobj_fd < 0)
|
||||
{
|
||||
fprintf(stderr, "can't open large object %d\n",
|
||||
fprintf(stderr, "cannot open large object %d\n",
|
||||
lobjId);
|
||||
}
|
||||
|
||||
@ -508,7 +508,7 @@ overwrite(PGconn *conn, Oid lobjId, int start, int len)
|
||||
lobj_fd = lo_open(conn, lobjId, INV_WRITE);
|
||||
if (lobj_fd < 0)
|
||||
{
|
||||
fprintf(stderr, "can't open large object %d\n",
|
||||
fprintf(stderr, "cannot open large object %d\n",
|
||||
lobjId);
|
||||
}
|
||||
|
||||
@ -550,7 +550,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
|
||||
lobj_fd = lo_open(conn, lobjId, INV_READ);
|
||||
if (lobj_fd < 0)
|
||||
{
|
||||
fprintf(stderr, "can't open large object %d\n",
|
||||
fprintf(stderr, "cannot open large object %d\n",
|
||||
lobjId);
|
||||
}
|
||||
|
||||
@ -560,7 +560,7 @@ exportFile(PGconn *conn, Oid lobjId, char *filename)
|
||||
fd = open(filename, O_CREAT | O_WRONLY, 0666);
|
||||
if (fd < 0)
|
||||
{ /* error */
|
||||
fprintf(stderr, "can't open unix file %s\n",
|
||||
fprintf(stderr, "cannot open unix file %s\n",
|
||||
filename);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.69 2007/02/01 00:28:17 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.70 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="maintenance">
|
||||
<title>Routine Database Maintenance Tasks</title>
|
||||
@ -296,7 +296,7 @@
|
||||
wraparound</>: the XID counter wraps around to zero, and all of a sudden
|
||||
transactions that were in the past appear to be in the future — which
|
||||
means their outputs become invisible. In short, catastrophic data loss.
|
||||
(Actually the data is still there, but that's cold comfort if you can't
|
||||
(Actually the data is still there, but that's cold comfort if you cannot
|
||||
get at it.) To avoid this, it is necessary to vacuum every table
|
||||
in every database at least once every two billion transactions.
|
||||
</para>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.62 2007/02/01 00:28:17 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.63 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="performance-tips">
|
||||
<title>Performance Tips</title>
|
||||
@ -437,7 +437,7 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 < 100 AND t
|
||||
<para>
|
||||
It is worth noting that <command>EXPLAIN</> results should not be extrapolated
|
||||
to situations other than the one you are actually testing; for example,
|
||||
results on a toy-sized table can't be assumed to apply to large tables.
|
||||
results on a toy-sized table cannot be assumed to apply to large tables.
|
||||
The planner's cost estimates are not linear and so it might choose
|
||||
a different plan for a larger or smaller table. An extreme example
|
||||
is that on a table that only occupies one disk page, you'll nearly
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.62 2007/02/01 00:28:17 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.63 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="plperl">
|
||||
<title>PL/Perl - Perl Procedural Language</title>
|
||||
@ -397,7 +397,7 @@ CREATE OR REPLACE FUNCTION lotsa_md5 (INTEGER) RETURNS SETOF foo_type AS $$
|
||||
my $t = localtime;
|
||||
elog(NOTICE, "opening file $file at $t" );
|
||||
open my $fh, '<', $file # ooh, it's a file access!
|
||||
or elog(ERROR, "can't open $file for reading: $!");
|
||||
or elog(ERROR, "cannot open $file for reading: $!");
|
||||
my @words = <$fh>;
|
||||
close $fh;
|
||||
$t = localtime;
|
||||
@ -541,7 +541,7 @@ CREATE OR REPLACE FUNCTION set_var(name text, val text) RETURNS text AS $$
|
||||
if ($_SHARED{$_[0]} = $_[1]) {
|
||||
return 'ok';
|
||||
} else {
|
||||
return "can't set shared variable $_[0] to $_[1]";
|
||||
return "cannot set shared variable $_[0] to $_[1]";
|
||||
}
|
||||
$$ LANGUAGE plperl;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/queries.sgml,v 1.43 2007/02/01 00:28:17 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/queries.sgml,v 1.44 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="queries">
|
||||
<title>Queries</title>
|
||||
@ -591,7 +591,7 @@ FROM (SELECT * FROM table1) AS alias_name
|
||||
|
||||
<para>
|
||||
This example is equivalent to <literal>FROM table1 AS
|
||||
alias_name</literal>. More interesting cases, which can't be
|
||||
alias_name</literal>. More interesting cases, which cannot be
|
||||
reduced to a plain join, arise when the subquery involves
|
||||
grouping or aggregation.
|
||||
</para>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.72 2007/01/31 23:26:03 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.73 2007/02/01 19:10:24 momjian Exp $
|
||||
-->
|
||||
|
||||
<refentry id="SQL-CREATEFUNCTION">
|
||||
@ -61,7 +61,7 @@ CREATE [ OR REPLACE ] FUNCTION
|
||||
Also, <command>CREATE OR REPLACE FUNCTION</command> will not let
|
||||
you change the return type of an existing function. To do that,
|
||||
you must drop and recreate the function. (When using <literal>OUT</>
|
||||
parameters, that means you can't change the names or types of any
|
||||
parameters, that means you cannot change the names or types of any
|
||||
<literal>OUT</> parameters except by dropping the function.)
|
||||
</para>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.50 2007/02/01 00:28:18 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.51 2007/02/01 19:10:24 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -138,7 +138,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
|
||||
Any <acronym>SQL</acronym> conditional expression (returning
|
||||
<type>boolean</type>). The condition expression cannot refer
|
||||
to any tables except <literal>NEW</> and <literal>OLD</>, and
|
||||
can not contain aggregate functions.
|
||||
cannot contain aggregate functions.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.46 2007/01/31 23:26:03 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.47 2007/02/01 19:10:24 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -71,7 +71,7 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>SELECT</command> does not modify any rows so you can not
|
||||
<command>SELECT</command> does not modify any rows so you cannot
|
||||
create <command>SELECT</command> triggers. Rules and views are more
|
||||
appropriate in such cases.
|
||||
</para>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.39 2007/01/31 23:26:04 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.40 2007/02/01 19:10:24 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -79,7 +79,7 @@ PostgreSQL documentation
|
||||
locale and character set encoding. The collation order
|
||||
(<literal>LC_COLLATE</>) and character set classes
|
||||
(<literal>LC_CTYPE</>, e.g. upper, lower, digit) are fixed for all
|
||||
databases and can not be changed. Collation orders other than
|
||||
databases and cannot be changed. Collation orders other than
|
||||
<literal>C</> or <literal>POSIX</> also have a performance penalty.
|
||||
For these reasons it is important to choose the right locale when
|
||||
running <command>initdb</command>. The remaining locale categories
|
||||
@ -266,7 +266,7 @@ PostgreSQL documentation
|
||||
By default, when <command>initdb</command>
|
||||
determines that an error prevented it from completely creating the database
|
||||
cluster, it removes any files it might have created before discovering
|
||||
that it can't finish the job. This option inhibits tidying-up and is
|
||||
that it cannot finish the job. This option inhibits tidying-up and is
|
||||
thus useful for debugging.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/notify.sgml,v 1.29 2007/01/31 23:26:04 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/notify.sgml,v 1.30 2007/02/01 19:10:24 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -64,7 +64,7 @@ NOTIFY <replaceable class="PARAMETER">name</replaceable>
|
||||
to a particular table, a useful programming technique is to put the
|
||||
<command>NOTIFY</command> in a rule that is triggered by table updates.
|
||||
In this way, notification happens automatically when the table is changed,
|
||||
and the application programmer can't accidentally forget to do it.
|
||||
and the application programmer cannot accidentally forget to do it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.182 2007/02/01 00:28:19 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.183 2007/02/01 19:10:24 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -543,7 +543,7 @@ PostgreSQL documentation
|
||||
determined at compile time.
|
||||
Since the database server uses the same default, you will not have
|
||||
to specify the port in most cases. The default user name is your
|
||||
Unix user name, as is the default database name. Note that you can't
|
||||
Unix user name, as is the default database name. Note that you cannot
|
||||
just connect to any database under any user name. Your database
|
||||
administrator should have informed you about your access rights.
|
||||
</para>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/rollback_to.sgml,v 1.8 2006/09/16 00:30:20 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/rollback_to.sgml,v 1.9 2007/02/01 19:10:24 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -82,7 +82,7 @@ ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] <replaceable>savepoint_name</re
|
||||
left it pointing to (that is, <command>FETCH</> is not rolled back).
|
||||
Closing a cursor is not undone by rolling back, either.
|
||||
A cursor whose execution causes a transaction to abort is put in a
|
||||
can't-execute state, so while the transaction can be restored using
|
||||
cannot-execute state, so while the transaction can be restored using
|
||||
<command>ROLLBACK TO SAVEPOINT</>, the cursor can no longer be used.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.98 2007/02/01 00:28:19 momjian Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/select.sgml,v 1.99 2007/02/01 19:10:25 momjian Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -892,8 +892,8 @@ FOR SHARE [ OF <replaceable class="parameter">table_name</replaceable> [, ...] ]
|
||||
|
||||
<para>
|
||||
<literal>FOR UPDATE</literal> and <literal>FOR SHARE</literal> cannot be
|
||||
used in contexts where returned rows can't be clearly identified with
|
||||
individual table rows; for example they can't be used with aggregation.
|
||||
used in contexts where returned rows cannot be clearly identified with
|
||||
individual table rows; for example they cannot be used with aggregation.
|
||||
</para>
|
||||
|
||||
<caution>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.495 2007/02/01 07:00:32 neilc Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/release.sgml,v 1.496 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
<!--
|
||||
|
||||
Typical markup:
|
||||
@ -16382,7 +16382,7 @@ Jdbc cleanups(Peter)
|
||||
Show backend status on ps command line(only works on some platforms)(Bruce)
|
||||
Pg_hba.conf now has a sameuser option in the database field
|
||||
Make lo_unlink take oid param, not int4
|
||||
New DISABLE_COMPLEX_MACRO for compilers that can't handle our macros(Bruce)
|
||||
New DISABLE_COMPLEX_MACRO for compilers that cannot handle our macros(Bruce)
|
||||
Libpgtcl now handles NOTIFY as a Tcl event, need not send dummy queries(Tom)
|
||||
libpgtcl cleanups(Tom)
|
||||
Add -error option to libpgtcl's pg_result command(Tom)
|
||||
@ -16737,7 +16737,7 @@ Better identify tcl and tk libs and includes(Bruce)
|
||||
places where subselects provide a better solution for your queries. I
|
||||
think you will find that there are more uses for subselects than you might
|
||||
think. Vadim has put us on the big SQL map with subselects, and fully
|
||||
functional ones too. The only thing you can't do with subselects is to
|
||||
functional ones too. The only thing you cannot do with subselects is to
|
||||
use them in the target list.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.50 2007/02/01 00:28:18 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/rules.sgml,v 1.51 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="rules">
|
||||
<title>The Rule System</title>
|
||||
@ -1078,7 +1078,7 @@ INSERT INTO shoelace_log VALUES (
|
||||
FROM shoelace_data *NEW*, shoelace_data *OLD*;
|
||||
</programlisting>
|
||||
|
||||
(This looks a little strange since you can't normally write
|
||||
(This looks a little strange since you cannot normally write
|
||||
<literal>INSERT ... VALUES ... FROM</>. The <literal>FROM</>
|
||||
clause here is just to indicate that there are range-table entries
|
||||
in the query tree for <literal>*NEW*</> and <literal>*OLD*</>.
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.23 2007/02/01 00:28:18 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/sources.sgml,v 2.24 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="source">
|
||||
<title>PostgreSQL Coding Conventions</title>
|
||||
@ -95,7 +95,7 @@ ereport(ERROR,
|
||||
func_signature_string(funcname, nargs,
|
||||
actual_arg_types)),
|
||||
errhint("Unable to choose a best candidate function. "
|
||||
"You may need to add explicit typecasts.")));
|
||||
"You might need to add explicit typecasts.")));
|
||||
</programlisting>
|
||||
This illustrates the use of format codes to embed run-time values into
|
||||
a message text. Also, an optional <quote>hint</> message is provided.
|
||||
@ -145,7 +145,7 @@ ereport(ERROR,
|
||||
<function>errmsg_internal(const char *msg, ...)</function> is the same as
|
||||
<function>errmsg</>, except that the message string will not be
|
||||
included in the internationalization message dictionary.
|
||||
This should be used for <quote>can't happen</> cases that are probably
|
||||
This should be used for <quote>cannot happen</> cases that are probably
|
||||
not worth expending translation effort on.
|
||||
</para>
|
||||
</listitem>
|
||||
@ -224,7 +224,7 @@ ereport(level, (errmsg_internal("format string", ...)));
|
||||
Therefore, <function>elog</> should be used only for internal errors and
|
||||
low-level debug logging. Any message that is likely to be of interest to
|
||||
ordinary users should go through <function>ereport</>. Nonetheless,
|
||||
there are enough internal <quote>can't happen</> error checks in the
|
||||
there are enough internal <quote>cannot happen</> error checks in the
|
||||
system that <function>elog</> is still widely used; it is preferred for
|
||||
those messages for its notational simplicity.
|
||||
</para>
|
||||
@ -528,7 +528,7 @@ BETTER: could not open file %s (I/O failure)
|
||||
not helpful information. If the error text doesn't make as much sense
|
||||
without the function name, reword it.
|
||||
<programlisting>
|
||||
BAD: pg_atoi: error in "z": can't parse "z"
|
||||
BAD: pg_atoi: error in "z": cannot parse "z"
|
||||
BETTER: invalid input syntax for integer: "z"
|
||||
</programlisting>
|
||||
</para>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.51 2007/02/01 00:28:18 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.52 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="spi">
|
||||
<title>Server Programming Interface</title>
|
||||
@ -2954,7 +2954,7 @@ INSERT INTO a SELECT * FROM a;
|
||||
(either an ordinary function or a trigger) follow one or the
|
||||
other of the above rules depending on the read/write flag passed
|
||||
to SPI. Commands executed in read-only mode follow the first
|
||||
rule: they can't see changes of the calling command. Commands executed
|
||||
rule: they cannot see changes of the calling command. Commands executed
|
||||
in read-write mode follow the second rule: they can see all changes made
|
||||
so far.
|
||||
</para>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/sql.sgml,v 1.44 2007/01/31 20:56:19 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/sql.sgml,v 1.45 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="sql-intro">
|
||||
<title>SQL</title>
|
||||
@ -1557,7 +1557,7 @@ SELECT *
|
||||
|
||||
<para>
|
||||
If we want to know the highest average part price among all our
|
||||
suppliers, we can't write MAX(AVG(PRICE)), but we can write:
|
||||
suppliers, we cannot write MAX(AVG(PRICE)), but we can write:
|
||||
|
||||
<programlisting>
|
||||
SELECT MAX(subtable.avgprice)
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.113 2007/02/01 00:28:18 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.114 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter id="sql-syntax">
|
||||
<title>SQL Syntax</title>
|
||||
@ -1425,7 +1425,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable>
|
||||
</synopsis>
|
||||
However, this only works for types whose names are also valid as
|
||||
function names. For example, <literal>double precision</literal>
|
||||
can't be used this way, but the equivalent <literal>float8</literal>
|
||||
cannot be used this way, but the equivalent <literal>float8</literal>
|
||||
can. Also, the names <literal>interval</>, <literal>time</>, and
|
||||
<literal>timestamp</> can only be used in this fashion if they are
|
||||
double-quoted, because of syntactic conflicts. Therefore, the use of
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/typeconv.sgml,v 1.50 2007/01/31 21:03:37 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/typeconv.sgml,v 1.51 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<chapter Id="typeconv">
|
||||
<title>Type Conversion</title>
|
||||
@ -447,10 +447,10 @@ try a similar case with <literal>~</>, we get:
|
||||
SELECT ~ '20' AS "negation";
|
||||
|
||||
ERROR: operator is not unique: ~ "unknown"
|
||||
HINT: Could not choose a best candidate operator. You may need to add explicit
|
||||
HINT: Could not choose a best candidate operator. You might need to add explicit
|
||||
type casts.
|
||||
</screen>
|
||||
This happens because the system can't decide which of the several
|
||||
This happens because the system cannot decide which of the several
|
||||
possible <literal>~</> operators should be preferred. We can help
|
||||
it out with an explicit cast:
|
||||
<screen>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.124 2007/02/01 00:28:18 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.125 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<sect1 id="xfunc">
|
||||
<title>User-Defined Functions</title>
|
||||
@ -114,7 +114,7 @@
|
||||
Besides <command>SELECT</command> queries, the commands can include data
|
||||
modification queries (<command>INSERT</command>,
|
||||
<command>UPDATE</command>, and <command>DELETE</command>), as well as
|
||||
other SQL commands. (The only exception is that you can't put
|
||||
other SQL commands. (The only exception is that you cannot put
|
||||
<command>BEGIN</>, <command>COMMIT</>, <command>ROLLBACK</>, or
|
||||
<command>SAVEPOINT</> commands into a <acronym>SQL</acronym> function.)
|
||||
However, the final command
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/xoper.sgml,v 1.40 2007/02/01 00:28:18 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/xoper.sgml,v 1.41 2007/02/01 19:10:24 momjian Exp $ -->
|
||||
|
||||
<sect1 id="xoper">
|
||||
<title>User-Defined Operators</title>
|
||||
@ -355,7 +355,7 @@ table1.column1 OP table2.column2
|
||||
Care should be exercised when preparing a hash function, because there
|
||||
are machine-dependent ways in which it might fail to do the right thing.
|
||||
For example, if your data type is a structure in which there might be
|
||||
uninteresting pad bits, you can't simply pass the whole structure to
|
||||
uninteresting pad bits, you cannot simply pass the whole structure to
|
||||
<function>hash_any</>. (Unless you write your other operators and
|
||||
functions to ensure that the unused bits are always zero, which is the
|
||||
recommended strategy.)
|
||||
|
Reference in New Issue
Block a user