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

Commit 1414d49

Browse files
committed
doc: more replacement of <literal> with something better
Reported-by: Alexander Law Author: Alexander Law Backpatch-through: 9.6
1 parent 616be05 commit 1414d49

File tree

7 files changed

+22
-18
lines changed

7 files changed

+22
-18
lines changed

doc/src/sgml/config.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,8 @@ include_dir 'conf.d'
12271227
</para>
12281228

12291229
<para>
1230-
If this is on, you should create users as <literal>username@dbname</>.
1231-
When <literal>username</> is passed by a connecting client,
1230+
If this is on, you should create users as <replaceable>username@dbname</>.
1231+
When <replaceable>username</> is passed by a connecting client,
12321232
<literal>@</> and the database name are appended to the user
12331233
name and that database-specific user name is looked up by the
12341234
server. Note that when you create users with names containing

doc/src/sgml/func.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13737,7 +13737,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
1373713737
<entry>No</entry>
1373813738
<entry>
1373913739
multiple continuous percentile: returns an array of results matching
13740-
the shape of the <literal>fractions</literal> parameter, with each
13740+
the shape of the <replaceable>fractions</replaceable> parameter, with each
1374113741
non-null element replaced by the value corresponding to that percentile
1374213742
</entry>
1374313743
</row>
@@ -13782,7 +13782,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
1378213782
<entry>No</entry>
1378313783
<entry>
1378413784
multiple discrete percentile: returns an array of results matching the
13785-
shape of the <literal>fractions</literal> parameter, with each non-null
13785+
shape of the <replaceable>fractions</replaceable> parameter, with each non-null
1378613786
element replaced by the input value corresponding to that percentile
1378713787
</entry>
1378813788
</row>
@@ -16787,7 +16787,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1678716787
<para>
1678816788
<function>pg_options_to_table</function> returns the set of storage
1678916789
option name/value pairs
16790-
(<literal>option_name</>/<literal>option_value</>) when passed
16790+
(<replaceable>option_name</>/<replaceable>option_value</>) when passed
1679116791
<structname>pg_class</>.<structfield>reloptions</> or
1679216792
<structname>pg_attribute</>.<structfield>attoptions</>.
1679316793
</para>

doc/src/sgml/ref/create_sequence.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ END;
349349
<itemizedlist>
350350
<listitem>
351351
<para>
352-
The standard's <literal>AS &lt;data type&gt;</literal> expression is not
352+
The standard's <literal>AS <replaceable>data_type</></literal> expression is not
353353
supported.
354354
</para>
355355
</listitem>

doc/src/sgml/ref/set_role.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ SELECT SESSION_USER, CURRENT_USER;
127127

128128
<para>
129129
<productname>PostgreSQL</productname>
130-
allows identifier syntax (<literal>"rolename"</literal>), while
130+
allows identifier syntax (<literal>"<replaceable>rolename</>"</literal>), while
131131
the SQL standard requires the role name to be written as a string
132132
literal. SQL does not allow this command during a transaction;
133133
<productname>PostgreSQL</productname> does not make this

doc/src/sgml/ref/set_session_auth.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ SELECT SESSION_USER, CURRENT_USER;
101101
The SQL standard allows some other expressions to appear in place
102102
of the literal <replaceable>user_name</replaceable>, but these options
103103
are not important in practice. <productname>PostgreSQL</productname>
104-
allows identifier syntax (<literal>"username"</literal>), which SQL
104+
allows identifier syntax (<literal>"<replaceable>username</>"</literal>), which SQL
105105
does not. SQL does not allow this command during a transaction;
106106
<productname>PostgreSQL</productname> does not make this
107107
restriction because there is no reason to.

doc/src/sgml/textsearch.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3622,10 +3622,10 @@ SELECT plainto_tsquery('supernovae stars');
36223622
</para>
36233623

36243624
<para>
3625-
The optional parameter <literal>PATTERN</literal> can be the name of
3625+
The optional parameter <replaceable>PATTERN</replaceable> can be the name of
36263626
a text search object, optionally schema-qualified. If
3627-
<literal>PATTERN</literal> is omitted then information about all
3628-
visible objects will be displayed. <literal>PATTERN</literal> can be a
3627+
<replaceable>PATTERN</replaceable> is omitted then information about all
3628+
visible objects will be displayed. <replaceable>PATTERN</replaceable> can be a
36293629
regular expression and can provide <emphasis>separate</emphasis> patterns
36303630
for the schema and object names. The following examples illustrate this:
36313631

doc/src/sgml/xfunc.sgml

+11-7
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ SELECT clean_emp();
204204

205205
<para>
206206
If an argument is of a composite type, then the dot notation,
207-
e.g., <literal>argname.fieldname</literal> or
208-
<literal>$1.fieldname</literal>, can be used to access attributes of the
207+
e.g., <literal><replaceable>argname</>.<replaceable>fieldname</></literal> or
208+
<literal>$1.<replaceable>fieldname</></literal>, can be used to access attributes of the
209209
argument. Again, you might need to qualify the argument's name with the
210210
function name to make the form with an argument name unambiguous.
211211
</para>
@@ -527,7 +527,8 @@ LINE 1: SELECT new_emp().name;
527527
Another option is to use
528528
functional notation for extracting an attribute. The simple way
529529
to explain this is that we can use the
530-
notations <literal>attribute(table)</> and <literal>table.attribute</>
530+
notations <literal><replaceable>attribute</>(<replaceable>table</>)</>
531+
and <literal><replaceable>table</>.<replaceable>attribute</></>
531532
interchangeably.
532533

533534
<screen>
@@ -1305,12 +1306,15 @@ CREATE FUNCTION test(smallint, double precision) RETURNS ...
13051306
<para>
13061307
A function that takes a single argument of a composite type should
13071308
generally not have the same name as any attribute (field) of that type.
1308-
Recall that <literal>attribute(table)</literal> is considered equivalent
1309-
to <literal>table.attribute</literal>. In the case that there is an
1309+
Recall that <literal><replaceable>attribute</>(<replaceable>table</>)</literal>
1310+
is considered equivalent
1311+
to <literal><replaceable>table</>.<replaceable>attribute</></literal>.
1312+
In the case that there is an
13101313
ambiguity between a function on a composite type and an attribute of
13111314
the composite type, the attribute will always be used. It is possible
13121315
to override that choice by schema-qualifying the function name
1313-
(that is, <literal>schema.func(table)</literal>) but it's better to
1316+
(that is, <literal><replaceable>schema</>.<replaceable>func</>(<replaceable>table</>)
1317+
</literal>) but it's better to
13141318
avoid the problem by not choosing conflicting names.
13151319
</para>
13161320

@@ -2818,7 +2822,7 @@ HeapTuple heap_form_tuple(TupleDesc tupdesc, Datum *values, bool *isnull)
28182822
HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values)
28192823
</programlisting>
28202824
to build a <structname>HeapTuple</> given user data
2821-
in C string form. <literal>values</literal> is an array of C strings,
2825+
in C string form. <parameter>values</parameter> is an array of C strings,
28222826
one for each attribute of the return row. Each C string should be in
28232827
the form expected by the input function of the attribute data
28242828
type. In order to return a null value for one of the attributes,

0 commit comments

Comments
 (0)