From ca9cb940d23dc8869a635fa27a08e60837b17c07 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 24 Aug 2016 21:11:44 -0400 Subject: [PATCH] doc: more replacement of with something better Reported-by: Alexander Law Author: Alexander Law Backpatch-through: 9.6 --- doc/src/sgml/config.sgml | 4 ++-- doc/src/sgml/func.sgml | 6 +++--- doc/src/sgml/ref/create_sequence.sgml | 2 +- doc/src/sgml/ref/set_role.sgml | 2 +- doc/src/sgml/ref/set_session_auth.sgml | 2 +- doc/src/sgml/textsearch.sgml | 6 +++--- doc/src/sgml/xfunc.sgml | 18 +++++++++++------- 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 5c8db97343..4db9c81e56 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1227,8 +1227,8 @@ include_dir 'conf.d' - If this is on, you should create users as username@dbname. - When username is passed by a connecting client, + If this is on, you should create users as username@dbname. + When username is passed by a connecting client, @ and the database name are appended to the user name and that database-specific user name is looked up by the server. Note that when you create users with names containing diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 6355300d9d..5c1c4f69fb 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -13800,7 +13800,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; No multiple continuous percentile: returns an array of results matching - the shape of the fractions parameter, with each + the shape of the fractions parameter, with each non-null element replaced by the value corresponding to that percentile @@ -13845,7 +13845,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab; No multiple discrete percentile: returns an array of results matching the - shape of the fractions parameter, with each non-null + shape of the fractions parameter, with each non-null element replaced by the input value corresponding to that percentile @@ -16850,7 +16850,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); pg_options_to_table returns the set of storage option name/value pairs - (option_name/option_value) when passed + (option_name/option_value) when passed pg_class.reloptions or pg_attribute.attoptions. diff --git a/doc/src/sgml/ref/create_sequence.sgml b/doc/src/sgml/ref/create_sequence.sgml index c9591462ee..62ae379226 100644 --- a/doc/src/sgml/ref/create_sequence.sgml +++ b/doc/src/sgml/ref/create_sequence.sgml @@ -349,7 +349,7 @@ END; - The standard's AS <data type> expression is not + The standard's AS data_type expression is not supported. diff --git a/doc/src/sgml/ref/set_role.sgml b/doc/src/sgml/ref/set_role.sgml index aff3792199..a97ceabcff 100644 --- a/doc/src/sgml/ref/set_role.sgml +++ b/doc/src/sgml/ref/set_role.sgml @@ -127,7 +127,7 @@ SELECT SESSION_USER, CURRENT_USER; PostgreSQL - allows identifier syntax ("rolename"), while + allows identifier syntax ("rolename"), while the SQL standard requires the role name to be written as a string literal. SQL does not allow this command during a transaction; PostgreSQL does not make this diff --git a/doc/src/sgml/ref/set_session_auth.sgml b/doc/src/sgml/ref/set_session_auth.sgml index 4ac2128950..96d279aaf9 100644 --- a/doc/src/sgml/ref/set_session_auth.sgml +++ b/doc/src/sgml/ref/set_session_auth.sgml @@ -101,7 +101,7 @@ SELECT SESSION_USER, CURRENT_USER; The SQL standard allows some other expressions to appear in place of the literal user_name, but these options are not important in practice. PostgreSQL - allows identifier syntax ("username"), which SQL + allows identifier syntax ("username"), which SQL does not. SQL does not allow this command during a transaction; PostgreSQL does not make this restriction because there is no reason to. diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index be5974a4ff..5a70d7db80 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -3622,10 +3622,10 @@ SELECT plainto_tsquery('supernovae stars'); - The optional parameter PATTERN can be the name of + The optional parameter PATTERN can be the name of a text search object, optionally schema-qualified. If - PATTERN is omitted then information about all - visible objects will be displayed. PATTERN can be a + PATTERN is omitted then information about all + visible objects will be displayed. PATTERN can be a regular expression and can provide separate patterns for the schema and object names. The following examples illustrate this: diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index d8d2e9e490..de6a466efc 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -204,8 +204,8 @@ SELECT clean_emp(); If an argument is of a composite type, then the dot notation, - e.g., argname.fieldname or - $1.fieldname, can be used to access attributes of the + e.g., argname.fieldname or + $1.fieldname, can be used to access attributes of the argument. Again, you might need to qualify the argument's name with the function name to make the form with an argument name unambiguous. @@ -527,7 +527,8 @@ LINE 1: SELECT new_emp().name; Another option is to use functional notation for extracting an attribute. The simple way to explain this is that we can use the - notations attribute(table) and table.attribute + notations attribute(table) + and table.attribute interchangeably. @@ -1305,12 +1306,15 @@ CREATE FUNCTION test(smallint, double precision) RETURNS ... A function that takes a single argument of a composite type should generally not have the same name as any attribute (field) of that type. - Recall that attribute(table) is considered equivalent - to table.attribute. In the case that there is an + Recall that attribute(table) + is considered equivalent + to table.attribute. + In the case that there is an ambiguity between a function on a composite type and an attribute of the composite type, the attribute will always be used. It is possible to override that choice by schema-qualifying the function name - (that is, schema.func(table)) but it's better to + (that is, schema.func(table) + ) but it's better to avoid the problem by not choosing conflicting names. @@ -2818,7 +2822,7 @@ HeapTuple heap_form_tuple(TupleDesc tupdesc, Datum *values, bool *isnull) HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) to build a HeapTuple given user data - in C string form. values is an array of C strings, + in C string form. values is an array of C strings, one for each attribute of the return row. Each C string should be in the form expected by the input function of the attribute data type. In order to return a null value for one of the attributes,