mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Misc documentation fixes.
- Misc grammar and punctuation fixes. - Stylistic cleanup: use spaces between function arguments and JSON fields in examples. For example "foo(a,b)" -> "foo(a, b)". Add semicolon after last END in a few PL/pgSQL examples that were missing them. - Make sentence that talked about "..." and ".." operators more clear, by avoiding to end the sentence with "..". That makes it look the same as "..." - Fix syntax description for HAVING: HAVING conditions cannot be repeated Patch by Justin Pryzby, per Yaroslav Schekin's report. Backpatch to all supported versions, to the extent that the patch applies easily. Discussion: https://www.postgresql.org/message-id/20201005191922.GE17626%40telsasoft.com
This commit is contained in:
parent
2a972e0165
commit
c5f42daa60
@ -1525,7 +1525,7 @@
|
||||
</para>
|
||||
<para>
|
||||
Role can log in. That is, this role can be given as the initial
|
||||
session authorization identifier
|
||||
session authorization identifier.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
|
@ -10168,8 +10168,8 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set, do not trace locks for tables below this OID. (use to avoid
|
||||
output on system tables)
|
||||
If set, do not trace locks for tables below this OID (used to avoid
|
||||
output on system tables).
|
||||
</para>
|
||||
<para>
|
||||
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
|
||||
|
@ -26599,7 +26599,7 @@ BEGIN
|
||||
obj.object_name,
|
||||
obj.object_identity;
|
||||
END LOOP;
|
||||
END
|
||||
END;
|
||||
$$;
|
||||
CREATE EVENT TRIGGER test_event_trigger_for_drops
|
||||
ON sql_drop
|
||||
|
@ -612,7 +612,7 @@
|
||||
</para>
|
||||
<para>
|
||||
<varname>gin_pending_list_limit</varname> can be overridden for individual
|
||||
GIN indexes by changing storage parameters, and which allows each
|
||||
GIN indexes by changing storage parameters, which allows each
|
||||
GIN index to have its own cleanup threshold.
|
||||
For example, it's possible to increase the threshold only for the GIN
|
||||
index which can be updated heavily, and decrease it otherwise.
|
||||
|
@ -1502,7 +1502,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
|
||||
Note that in this mode, the server will apply WAL one file at a
|
||||
time, so if you use the standby server for queries (see Hot Standby),
|
||||
there is a delay between an action in the primary and when the
|
||||
action becomes visible in the standby, corresponding the time it takes
|
||||
action becomes visible in the standby, corresponding to the time it takes
|
||||
to fill up the WAL file. <varname>archive_timeout</varname> can be used to make that delay
|
||||
shorter. Also note that you can't combine streaming replication with
|
||||
this method.
|
||||
|
@ -612,7 +612,7 @@ amgettuple (IndexScanDesc scan,
|
||||
will pass the caller's snapshot test. On success, <function>amgettuple</function>
|
||||
must also set <literal>scan->xs_recheck</literal> to true or false.
|
||||
False means it is certain that the index entry matches the scan keys.
|
||||
true means this is not certain, and the conditions represented by the
|
||||
True means this is not certain, and the conditions represented by the
|
||||
scan keys must be rechecked against the heap tuple after fetching it.
|
||||
This provision supports <quote>lossy</quote> index operators.
|
||||
Note that rechecking will extend only to the scan conditions; a partial
|
||||
|
@ -14,7 +14,7 @@
|
||||
hard-coded list of prefixes; this list of prefixes is also used to hyphenate
|
||||
numbers on output. Since new prefixes are assigned from time to time, the
|
||||
list of prefixes may be out of date. It is hoped that a future version of
|
||||
this module will obtained the prefix list from one or more tables that
|
||||
this module will obtain the prefix list from one or more tables that
|
||||
can be easily updated by users as needed; however, at present, the
|
||||
list can only be updated by modifying the source code and recompiling.
|
||||
Alternatively, prefix validation and hyphenation support may be
|
||||
|
@ -1245,7 +1245,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
|
||||
<para>
|
||||
The <literal>FOR UPDATE</literal> lock mode
|
||||
is also acquired by any <command>DELETE</command> on a row, and also by an
|
||||
<command>UPDATE</command> that modifies the values on certain columns. Currently,
|
||||
<command>UPDATE</command> that modifies the values of certain columns. Currently,
|
||||
the set of columns considered for the <command>UPDATE</command> case are those that
|
||||
have a unique index on them that can be used in a foreign key (so partial
|
||||
indexes and expressional indexes are not considered), but this may change
|
||||
|
@ -471,7 +471,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following operations are always parallel restricted.
|
||||
The following operations are always parallel restricted:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
@ -1181,7 +1181,7 @@ BEGIN
|
||||
SELECT users.userid INTO STRICT userid
|
||||
FROM users WHERE users.username = get_userid.username;
|
||||
RETURN userid;
|
||||
END
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
</programlisting>
|
||||
On failure, this function might produce an error message such as
|
||||
@ -1854,7 +1854,7 @@ BEGIN
|
||||
RETURN NEXT r; -- return current row of SELECT
|
||||
END LOOP;
|
||||
RETURN;
|
||||
END
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql;
|
||||
|
||||
@ -1882,7 +1882,7 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
RETURN;
|
||||
END
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql;
|
||||
|
||||
@ -1956,7 +1956,7 @@ DECLARE myvar int := 5;
|
||||
BEGIN
|
||||
CALL triple(myvar);
|
||||
RAISE NOTICE 'myvar = %', myvar; -- prints 15
|
||||
END
|
||||
END;
|
||||
$$;
|
||||
</programlisting>
|
||||
</para>
|
||||
@ -3559,7 +3559,7 @@ BEGIN
|
||||
ROLLBACK;
|
||||
END IF;
|
||||
END LOOP;
|
||||
END
|
||||
END;
|
||||
$$;
|
||||
|
||||
CALL transaction_test1();
|
||||
@ -5213,7 +5213,7 @@ DECLARE
|
||||
f1 int;
|
||||
BEGIN
|
||||
RETURN f1;
|
||||
END
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
WARNING: variable "f1" shadows a previously defined variable
|
||||
LINE 3: f1 int;
|
||||
|
@ -2839,7 +2839,7 @@ The commands accepted in replication mode are:
|
||||
<para>
|
||||
Every sent transaction contains zero or more DML messages (Insert,
|
||||
Update, Delete). In case of a cascaded setup it can also contain Origin
|
||||
messages. The origin message indicated that the transaction originated on
|
||||
messages. The origin message indicates that the transaction originated on
|
||||
different replication node. Since a replication node in the scope of logical
|
||||
replication protocol can be pretty much anything, the only identifier
|
||||
is the origin name. It's downstream's responsibility to handle this as
|
||||
|
@ -38,7 +38,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
|
||||
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
|
||||
[ WHERE <replaceable class="parameter">condition</replaceable> ]
|
||||
[ GROUP BY <replaceable class="parameter">grouping_element</replaceable> [, ...] ]
|
||||
[ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
|
||||
[ HAVING <replaceable class="parameter">condition</replaceable> ]
|
||||
[ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
|
||||
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
|
||||
[ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]
|
||||
|
@ -28,7 +28,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
|
||||
[ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
|
||||
[ WHERE <replaceable class="parameter">condition</replaceable> ]
|
||||
[ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...] ]
|
||||
[ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
|
||||
[ HAVING <replaceable class="parameter">condition</replaceable> ]
|
||||
[ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
|
||||
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
|
||||
[ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]
|
||||
|
@ -769,7 +769,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The benefit of implementing views with the rule system is,
|
||||
The benefit of implementing views with the rule system is
|
||||
that the planner has all
|
||||
the information about which tables have to be scanned plus the
|
||||
relationships between these tables plus the restrictive
|
||||
@ -781,7 +781,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
|
||||
the best path to execute the query, and the more information
|
||||
the planner has, the better this decision can be. And
|
||||
the rule system as implemented in <productname>PostgreSQL</productname>
|
||||
ensures, that this is all information available about the query
|
||||
ensures that this is all information available about the query
|
||||
up to that point.
|
||||
</para>
|
||||
</sect2>
|
||||
@ -2087,7 +2087,7 @@ CREATE FUNCTION tricky(text, text) RETURNS bool AS $$
|
||||
BEGIN
|
||||
RAISE NOTICE '% => %', $1, $2;
|
||||
RETURN true;
|
||||
END
|
||||
END;
|
||||
$$ LANGUAGE plpgsql COST 0.0000000000000000000001;
|
||||
|
||||
SELECT * FROM phone_number WHERE tricky(person, phone);
|
||||
|
@ -205,8 +205,8 @@ test=> select '6.25 .. 6.50'::seg as "pH";
|
||||
</table>
|
||||
|
||||
<para>
|
||||
Because <literal>...</literal> is widely used in data sources, it is allowed
|
||||
as an alternative spelling of <literal>..</literal>. Unfortunately, this
|
||||
Because the <literal>...</literal> operator is widely used in data sources, it is allowed
|
||||
as an alternative spelling of the <literal>..</literal> operator. Unfortunately, this
|
||||
creates a parsing ambiguity: it is not clear whether the upper bound
|
||||
in <literal>0...23</literal> is meant to be <literal>23</literal> or <literal>0.23</literal>.
|
||||
This is resolved by requiring at least one digit before the decimal
|
||||
|
Loading…
x
Reference in New Issue
Block a user