From c30446b9c901b357f9a7b859c51bee5740ac313f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 17 Jun 2009 21:58:49 +0000 Subject: Proofreading for Bruce's recent round of documentation proofreading. Most of those changes were good, but some not so good ... --- doc/src/sgml/func.sgml | 315 ++++++++++++++++++++++++++----------------------- 1 file changed, 168 insertions(+), 147 deletions(-) (limited to 'doc/src/sgml/func.sgml') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index a594a12ed7b..cbadf0f99a1 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -268,8 +268,9 @@ a >= x AND a <= y - Note BETWEEN is inclusive in comparing the endpoint - values. NOT BETWEEN does the opposite comparison: + Notice that BETWEEN treats the endpoint values as included + in the range. + NOT BETWEEN does the opposite comparison: a NOT BETWEEN x AND y @@ -280,9 +281,11 @@ BETWEEN SYMMETRIC - BETWEEN SYMMETRIC is the same as BETWEEN - except there is no requirement that the argument to the left of AND be less than - or equal to the argument on the right; the proper range is automatically determined. + BETWEEN SYMMETRIC is the same as BETWEEN + except there is no requirement that the argument to the left of + AND be less than or equal to the argument on the right. + If it is not, those two arguments are automatically swapped, so that + a nonempty range is always implied. @@ -322,7 +325,7 @@ - Some applications might expect + Some applications might expect that expression = NULL returns true if expression evaluates to the null value. It is highly recommended that these applications @@ -358,11 +361,11 @@ IS NOT DISTINCT FROM - Ordinary comparison operators yield null (signifying unknown) - when either input is null, not true or false, e.g., 7 = - NULL yields null. - Another way to do comparisons is with the - IS NOT DISTINCT FROM construct: + Ordinary comparison operators yield null (signifying unknown), + not true or false, when either input is null. For example, + 7 = NULL yields null. When this behavior is not suitable, + use the + IS NOT DISTINCT FROM constructs: expression IS DISTINCT FROM expression expression IS NOT DISTINCT FROM expression @@ -440,8 +443,8 @@ Mathematical operators are provided for many - PostgreSQL types. For types that support - only limited mathematical operations + PostgreSQL types. For types without + standard mathematical conventions (e.g., date/time types) we describe the actual behavior in subsequent sections. @@ -1010,11 +1013,13 @@ - SQL defines some string functions with a special syntax - wherein certain key words rather than commas are used to separate the - arguments. Details are in . - These functions are also implemented using the regular syntax for - function invocation. (See .) + SQL defines some string functions that use + key words, rather than commas, to separate + arguments. Details are in + . + PostgreSQL also provides versions of these functions + that use the regular function invocation syntax + (see ). @@ -1795,8 +1800,8 @@ The conversion names follow a standard naming scheme: The official name of the source encoding with all - non-alphanumeric characters replaced by underscores followed - by _to_ followed by similarly + non-alphanumeric characters replaced by underscores, followed + by _to_, followed by the similarly processed destination encoding name. Therefore, the names might deviate from the customary encoding names. @@ -2598,12 +2603,12 @@ SQL defines some string functions that use - a key word syntax, rather than commas to separate + key words, rather than commas, to separate arguments. Details are in . - Such functions are also implemented using the regular syntax for - function invocation. - (See .) + PostgreSQL also provides versions of these functions + that use the regular function invocation syntax + (see ). @@ -2999,7 +3004,7 @@ cast(-44 as bit(12)) 111111010100 - The LIKE expression returns true if + The LIKE expression returns true if the string matches the supplied pattern. (As expected, the NOT LIKE expression returns @@ -3011,11 +3016,11 @@ cast(-44 as bit(12)) 111111010100 If pattern does not contain percent - signs or underscore, then the pattern only represents the string + signs or underscores, then the pattern only represents the string itself; in that case LIKE acts like the equals operator. An underscore (_) in pattern stands for (matches) any single - character; a percent sign (%) matches any string + character; a percent sign (%) matches any sequence of zero or more characters. @@ -3028,7 +3033,7 @@ cast(-44 as bit(12)) 111111010100 'abc' LIKE 'c' false - + LIKE pattern matching always covers the entire string. Therefore, to match a sequence anywhere within a string, the @@ -3036,9 +3041,9 @@ cast(-44 as bit(12)) 111111010100 - To match only a literal underscore or percent sign without matching + To match a literal underscore or percent sign without matching other characters, the respective character in - pattern must be + pattern must be preceded by the escape character. The default escape character is the backslash but a different one can be selected by using the ESCAPE clause. To match the escape @@ -3053,8 +3058,8 @@ cast(-44 as bit(12)) 111111010100 actually matches a literal backslash means writing four backslashes in the statement. You can avoid this by selecting a different escape character with ESCAPE; then a backslash is not special to - LIKE anymore. (But backslash is still special to the string - literal parser, so you still need two of them.) + LIKE anymore. (But backslash is still special to the + string literal parser, so you still need two of them to match a backslash.) @@ -3163,9 +3168,9 @@ cast(-44 as bit(12)) 111111010100 - Notice that bounded repetition (? and {...}) - is not provided, though they exist in POSIX. Also, the period (.) - is not a metacharacter. + Notice that bounded repetition operators (? and + {...}) are not provided, though they exist in POSIX. + Also, the period (.) is not a metacharacter. @@ -3295,7 +3300,7 @@ substring('foobar' from '#"o_b#"%' for '#') NULLLIKE, pattern characters match string characters exactly unless they are special characters in the regular expression language — but regular expressions use - different special characters than LIKE. + different special characters than LIKE does. Unlike LIKE patterns, a regular expression is allowed to match anywhere within a string, unless the regular expression is explicitly anchored to the beginning or @@ -3562,7 +3567,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; A branch is zero or more quantified atoms or constraints, concatenated. - It tries a match of the first, followed by a match for the second, etc; + It matches a match for the first, followed by a match for the second, etc; an empty branch matches the empty string. @@ -3579,7 +3584,8 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; A constraint matches an empty string, but matches only when - specific conditions are met. A constraint cannot be followed by a quantifier. + specific conditions are met. A constraint can be used where an atom + could be used, except it cannot be followed by a quantifier. The simple constraints are shown in ; some more constraints are described later. @@ -3788,12 +3794,12 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; ^ - matches the beginning of the string + matches at the beginning of the string $ - matches the end of the string + matches at the end of the string @@ -3842,12 +3848,12 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; To include a literal ] in the list, make it the - first character (possibly following a ^). To + first character (after ^, if that is used). To include a literal -, make it the first or last character, or the second endpoint of a range. To use a literal - - as the start of a range, enclose it + - as the first endpoint of a range, enclose it in [. and .] to make it a - collating element (see below). With the exception of these characters and + collating element (see below). With the exception of these characters, some combinations using [ (see next paragraphs), and escapes (AREs only), all other special characters lose their special significance within a bracket expression. @@ -3945,7 +3951,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; Character-entry escapes exist to make it easier to specify - non-printing and inconvenient characters in REs. They are + non-printing and other inconvenient characters in REs. They are shown in . @@ -4050,7 +4056,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; \uwxyz (where wxyz is exactly four hexadecimal digits) the UTF16 (Unicode, 16-bit) character U+wxyz - in the local byte encoding + in the local byte ordering @@ -4058,7 +4064,7 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; (where stuvwxyz is exactly eight hexadecimal digits) reserved for a hypothetical Unicode extension to 32 bits - + @@ -4067,11 +4073,11 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; - \x### - (where ### is any sequence of hexadecimal + \xhhh + (where hhh is any sequence of hexadecimal digits) the character whose hexadecimal value is - 0x### + 0xhhh (a single character no matter how many hexadecimal digits are used) @@ -4082,19 +4088,19 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; - \## - (where ## is exactly two octal digits, + \xy + (where xy is exactly two octal digits, and is not a back reference) the character whose octal value is - 0## + 0xy - \### - (where ### is exactly three octal digits, + \xyz + (where xyz is exactly three octal digits, and is not a back reference) the character whose octal value is - 0### + 0xyz @@ -4258,12 +4264,12 @@ SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo; There is an inherent ambiguity between octal character-entry - escapes and back references, which is resolved by heuristics, + escapes and back references, which is resolved by the following heuristics, as hinted at above. A leading zero always indicates an octal escape. A single non-zero digit, not followed by another digit, is always taken as a back reference. - A multidigit sequence not starting with a zero is taken as a back + A multi-digit sequence not starting with a zero is taken as a back reference if it comes after a suitable subexpression (i.e., the number is in the legal range for a back reference), and otherwise is taken as octal. @@ -4749,7 +4755,7 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); double precision argument and converts from Unix epoch (seconds since 1970-01-01 00:00:00+00) to timestamp with time zone. - (Integer Unix epochs are implicitly cast to + (Integer Unix epochs are implicitly cast to double precision.) @@ -4817,7 +4823,7 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); to_timestamp(double precision) timestamp with time zone - convert UNIX epoch to time stamp + convert Unix epoch to time stamp to_timestamp(1284352323) @@ -4825,11 +4831,12 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
- In a to_char output template string, there are certain patterns that are - recognized and replaced with appropriately-formatted data based on the value. - Any text that is not a template pattern is simply - copied verbatim. Similarly, in an input template string (anything but to_char), template patterns - identify the values to be supplied by the input data string. + In a to_char output template string, there are certain + patterns that are recognized and replaced with appropriately-formatted + data based on the given value. Any text that is not a template pattern is + simply copied verbatim. Similarly, in an input template string (for the + other functions), template patterns identify the values to be supplied by + the input data string. @@ -5033,11 +5040,11 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); RM - uppercase month in Roman numerals (I-XII; I=January) + month in uppercase Roman numerals (I-XII; I=January) rm - lowercase month in Roman numerals (i-xii; i=January) + month in lowercase Roman numerals (i-xii; i=January) TZ @@ -5073,7 +5080,7 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); FM prefix - fill mode (suppress padding of blanks and zeroes) + fill mode (suppress padding blanks and zeroes) FMMonth @@ -5099,7 +5106,7 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); SP suffix - spell mode (not supported) + spell mode (not implemented) DDSP @@ -5127,8 +5134,8 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); to_timestamp and to_date - skip multiple blank spaces in the input string unless the FX option - is used. For example, + skip multiple blank spaces in the input string unless the + FX option is used. For example, to_timestamp('2000    JUN', 'YYYY MON') works, but to_timestamp('2000    JUN', 'FXYYYY MON') returns an error because to_timestamp expects one space only. @@ -5177,8 +5184,8 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); In conversions from string to timestamp or - date, the CC field (century) is ignored if there - is a YYY, YYYY or + date, the CC (century) field is ignored + if there is a YYY, YYYY or Y,YYY field. If CC is used with YY or Y then the year is computed as (CC-1)*100+YY. @@ -5220,7 +5227,7 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); In a conversion from string to timestamp, millisecond - (MS) and microsecond (US) + (MS) or microsecond (US) values are used as the seconds digits after the decimal point. For example to_timestamp('12:3', 'SS:MS') is not 3 milliseconds, @@ -5251,7 +5258,8 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); - to_char(interval) formats HH and + + to_char(interval) formats HH and HH12 as hours in a single day, while HH24 can output hours exceeding a single day, e.g., >24. @@ -5390,14 +5398,14 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); multiplies the input values by 10^n, where n is the number of digits following - V. + V. to_char does not support the use of - V with non-integer values. - (e.g., 99.9V99 is not allowed.) + V combined with a decimal point + (e.g., 99.9V99 is not allowed). - + Certain modifiers can be applied to any template pattern to alter its @@ -6129,7 +6137,7 @@ EXTRACT(field FROM source) century - The century: + The century @@ -6225,7 +6233,7 @@ SELECT EXTRACT(DOY FROM TIMESTAMP '2001-02-16 20:38:40'); For date and timestamp values, the - number of seconds since 1970-01-01 00:00:00-00 GMT (can be negative); + number of seconds since 1970-01-01 00:00:00 UTC (can be negative); for interval values, the total number of seconds in the interval @@ -6778,6 +6786,9 @@ now() + transaction_timestamp() is equivalent to + CURRENT_TIMESTAMP, but is named to clearly reflect + what it returns. statement_timestamp() returns the start time of the current statement (more specifically, the time of receipt of the latest command message from the client). @@ -6792,10 +6803,7 @@ now() but as a formatted text string rather than a timestamp with time zone value. now() is a traditional PostgreSQL - equivalent to CURRENT_TIMESTAMP. - transaction_timestamp() is likewise equivalent to - CURRENT_TIMESTAMP, but is named to clearly reflect - what it returns. + equivalent to transaction_timestamp(). @@ -7428,7 +7436,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple It is possible to access the two component numbers of a point - as though they were an array with indices 0 and 1. For example, if + as though the point were an array with indexes 0 and 1. For example, if t.p is a point column then SELECT p[0] FROM t retrieves the X coordinate and UPDATE t SET p[1] = ... changes the Y coordinate. @@ -8235,7 +8243,7 @@ SELECT xmlelement(name test, xmlattributes(func(a, b))) FROM test; Element content, if specified, will be formatted according to - the data type. If the content is itself of type xml, + its data type. If the content is itself of type xml, complex XML documents can be constructed. For example: The xmlroot expression alters the properties of the root node of an XML value. If a version is specified, - this replaces the value in the version declaration; if a - standalone value is specified, this replaces the value in the - standalone declaration. + it replaces the value in the root node's version declaration; if a + standalone setting is specified, it replaces the value in the + root node's standalone declaration. @@ -8967,7 +8975,7 @@ SELECT setval('foo', 42, false); Next nextval wi If a sequence object has been created with default parameters, - nextval will return successive values + successive nextval calls will return successive values beginning with 1. Other behaviors can be obtained by using special parameters in the command; see its command reference page for more information. @@ -9028,16 +9036,17 @@ END CASE clauses can be used wherever - an expression is valid. condition is an - expression that returns a boolean result. If the result is true - the value of the CASE expression is the - result that follows the condition. If the result is false - subsequent WHEN clauses are searched in the same - manner. If no WHEN - condition is true then the value of the - case expression is the result of the + an expression is valid. Each condition is an + expression that returns a boolean result. If the condition's + result is true, the value of the CASE expression is the + result that follows the condition, and the + remainder of the CASE expression is not processed. If the + condition's result is not true, any subsequent WHEN clauses + are examined in the same manner. If no WHEN + condition yields true, the value of the + CASE expression is the result of the ELSE clause. If the ELSE clause is - omitted and no condition matches, the result is null. + omitted and no condition is true, the result is null. @@ -9074,8 +9083,8 @@ SELECT a, - The following CASE expression is a - variant of the general form above: + There is a simple form of CASE expression + that is a variant of the general form above: CASE expression @@ -9085,10 +9094,10 @@ CASE expression END - The - expression is computed and compared to - all the values in the - WHEN clauses until one is found that is equal. If + The first + expression is computed, then compared to + each of the value expressions in the + WHEN clauses until one is found that is equal to it. If no match is found, the result of the ELSE clause (or a null value) is returned. This is similar to the switch statement in C. @@ -9114,8 +9123,8 @@ SELECT a, - A CASE expression evaluates any subexpressions - that are needed to determine the result. For example, this is a + A CASE expression does not evaluate any subexpressions + that are not needed to determine the result. For example, this is a possible way of avoiding a division-by-zero failure: SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END; @@ -9154,7 +9163,7 @@ SELECT COALESCE(description, short_description, '(none)') ... Like a CASE expression, COALESCE only - evaluates arguments that are needed to determine the result; + evaluates the arguments that are needed to determine the result; that is, arguments to the right of the first non-null argument are not evaluated. This SQL-standard function provides capabilities similar to NVL and IFNULL, which are used in some other @@ -9804,17 +9813,18 @@ SELECT NULLIF(value, '(none)') ... SOME - Boolean aggregates bool_and and + Boolean aggregates bool_and and bool_or correspond to standard SQL aggregates every and any or - some. - As for any and some, + some. + As for any and some, it seems that there is an ambiguity built into the standard syntax: SELECT b1 = ANY((SELECT b2 FROM t2 ...)) FROM t1 ...; - Here ANY can be considered as leading either - to a subquery or to an aggregate, if the select expression returns one row. + Here ANY can be considered either as introducing + a subquery, or as being an aggregate function, if the sub-select + returns one row with a boolean value. Thus the standard name cannot be given to these aggregates.
@@ -9829,7 +9839,7 @@ SELECT b1 = ANY((SELECT b2 FROM t2 ...)) FROM t1 ...; SELECT count(*) FROM sometable; will be executed by PostgreSQL using a - sequential scan of an entire table. + sequential scan of the entire table.
@@ -10533,7 +10543,7 @@ EXISTS (subquery) or subquery. The subquery is evaluated to determine whether it returns any rows. If it returns at least one row, the result of EXISTS is - true; if the subquery returns no rows, the result of EXISTS + true; if the subquery returns no rows, the result of EXISTS is false. @@ -10882,7 +10892,7 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2); The forms involving array subexpressions are PostgreSQL extensions; the rest are SQL-compliant. - All of the expressions documented in this section return + All of the expression forms documented in this section return Boolean (true/false) results. @@ -11594,8 +11604,8 @@ SET search_path TO schema , schema, .. pg_my_temp_schema returns the OID of the current - session's temporary schema, or 0 if it has none (because no - temporary tables have been created). + session's temporary schema, or zero if it has none (because it has not + created any temporary tables). pg_is_other_temp_schema returns true if the given OID is the OID of another session's temporary schema. (This can be useful, for example, to exclude other sessions' temporary @@ -11891,7 +11901,8 @@ SELECT has_table_privilege('joe', 'mytable', 'INSERT, SELECT WITH GRANT OPTION') has_any_column_privilege checks whether a user can - access any column of a table in a particular way; its argument possibilities + access any column of a table in a particular way. + Its argument possibilities are analogous to has_table_privilege, except that the desired access privilege type must evaluate to some combination of @@ -11908,7 +11919,8 @@ SELECT has_table_privilege('joe', 'mytable', 'INSERT, SELECT WITH GRANT OPTION') has_column_privilege checks whether a user - can access a column in a particular way; its argument possibilities + can access a column in a particular way. + Its argument possibilities are analogous to has_table_privilege, with the addition that the column can be specified either by name or attribute number. @@ -11922,7 +11934,8 @@ SELECT has_table_privilege('joe', 'mytable', 'INSERT, SELECT WITH GRANT OPTION') has_database_privilege checks whether a user - can access a database in a particular way; its argument possibilities + can access a database in a particular way. + Its argument possibilities are analogous to has_table_privilege. The desired access privilege type must evaluate to some combination of CREATE, @@ -11934,7 +11947,8 @@ SELECT has_table_privilege('joe', 'mytable', 'INSERT, SELECT WITH GRANT OPTION') has_function_privilege checks whether a user - can access a function in a particular way; its argument possibilities + can access a function in a particular way. + Its argument possibilities are analogous to has_table_privilege. When specifying a function by a text string rather than by OID, the allowed input is the same as for the regprocedure data type @@ -11949,7 +11963,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); has_foreign_data_wrapper_privilege checks whether a user - can access a foreign-data wrapper in a particular way; its argument possibilities + can access a foreign-data wrapper in a particular way. + Its argument possibilities are analogous to has_table_privilege. The desired access privilege type must evaluate to USAGE. @@ -11957,7 +11972,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); has_language_privilege checks whether a user - can access a procedural language in a particular way; its argument possibilities + can access a procedural language in a particular way. + Its argument possibilities are analogous to has_table_privilege. The desired access privilege type must evaluate to USAGE. @@ -11965,7 +11981,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); has_schema_privilege checks whether a user - can access a schema in a particular way; its argument possibilities + can access a schema in a particular way. + Its argument possibilities are analogous to has_table_privilege. The desired access privilege type must evaluate to some combination of CREATE or @@ -11974,7 +11991,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); has_server_privilege checks whether a user - can access a foreign server in a particular way; its argument possibilities + can access a foreign server in a particular way. + Its argument possibilities are analogous to has_table_privilege. The desired access privilege type must evaluate to USAGE. @@ -11982,7 +12000,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); has_tablespace_privilege checks whether a user - can access a tablespace in a particular way; its argument possibilities + can access a tablespace in a particular way. + Its argument possibilities are analogous to has_table_privilege. The desired access privilege type must evaluate to CREATE. @@ -11990,7 +12009,8 @@ SELECT has_function_privilege('joeuser', 'myfunc(int, text)', 'execute'); pg_has_role checks whether a user - can access a role in a particular way; its argument possibilities + can access a role in a particular way. + Its argument possibilities are analogous to has_table_privilege. The desired access privilege type must evaluate to some combination of MEMBER or @@ -12305,7 +12325,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); get CREATE [ CONSTRAINT ] TRIGGER command for trigger - pg_get_userbyid(roleid) + pg_get_userbyid(role_oid) name get role name with given OID @@ -12559,7 +12579,7 @@ SELECT typlen FROM pg_type WHERE oid = pg_typeof(33); The functions shown in - export server transaction information. The main + provide server transaction information in an exportable form. The main use of these functions is to determine which transactions were committed between two snapshots. @@ -12641,8 +12661,8 @@ SELECT typlen FROM pg_type WHERE oid = pg_typeof(33); xmax - First as-yet-unassigned txid. All txids later than this are - not yet started as of the time of the snapshot, and thus invisible. + First as-yet-unassigned txid. All txids greater than or equal to this + are not yet started as of the time of the snapshot, and thus invisible. @@ -12652,7 +12672,7 @@ SELECT typlen FROM pg_type WHERE oid = pg_typeof(33); Active txids at the time of the snapshot. The list includes only those active txids between xmin and xmax; there might be active txids higher - than xmax. A txid that is xmin <= txid < + than xmax. A txid that is xmin <= txid < xmax and not in this list was already completed at the time of the snapshot, and thus either visible or dead according to its commit status. The list does not @@ -12834,9 +12854,9 @@ SELECT set_config('log_statement_stats', 'off', false); The process ID of an active backend can be found from the procpid column of the pg_stat_activity view, or by listing the - postgres processes on the server using + postgres processes on the server (using ps on Unix or the Task - Manager on Windows. + Manager on Windows). @@ -12904,7 +12924,7 @@ SELECT set_config('log_statement_stats', 'off', false); pg_stop_backup() text - Finalize after performing on-line backup + Finish performing on-line backup @@ -12991,7 +13011,7 @@ postgres=# select pg_start_backup('label_goes_here'); pg_current_xlog_location displays the current transaction log write - location in the format used by the above functions. Similarly, + location in the same format used by the above functions. Similarly, pg_current_xlog_insert_location displays the current transaction log insertion point. The insertion point is the logical end of the transaction log @@ -13086,9 +13106,9 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); bigint - Disk space used by the specified fork, 'main' or - 'fsm', of a table or index with the specified OID - or name; the table name can be schema-qualified. + Disk space used by the specified fork ('main', + 'fsm' or 'vm') + of the table or index with the specified OID or name @@ -13128,8 +13148,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); bigint Total disk space used by the table with the specified OID or name, - including indexes and TOAST data; the table name can be - schema-qualified. + including indexes and TOAST data @@ -13154,6 +13173,8 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); size of the main data fork of the relation. Specifying 'fsm' returns the size of the Free Space Map (see ) associated with the + relation. Specifying 'vm' returns the size of the + Visibility Map (see ) associated with the relation. @@ -13240,7 +13261,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); size, last accessed time stamp, last modified time stamp, last file status change time stamp (Unix platforms only), file creation time stamp (Windows only), and a boolean - indicating if it is a directory. Typical usage include: + indicating if it is a directory. Typical usages include: SELECT * FROM pg_stat_file('filename'); SELECT (pg_stat_file('filename')).modification; @@ -13425,8 +13446,8 @@ SELECT (pg_stat_file('filename')).modification; pg_advisory_unlock_shared works the same as - pg_advisory_unlock, - except is releases a shared advisory lock. + pg_advisory_unlock, + except it releases a shared advisory lock. @@ -13435,7 +13456,7 @@ SELECT (pg_stat_file('filename')).modification; pg_advisory_unlock_all will release all advisory locks held by the current session. (This function is implicitly invoked - at session end, even if the client disconnects abruptly.) + at session end, even if the client disconnects ungracefully.) -- cgit v1.2.3