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

Commit 232f147

Browse files
committed
doc: Clean up some recently added PL/pgSQL documentation
- Capitalize titles consistently. - Fix some grammar. - Group "Obtaining Information About an Error" under "Trapping Errors", but make "Obtaining the Call Stack Context Information" its own section, since it's not about errors.
1 parent d826d8e commit 232f147

File tree

1 file changed

+14
-25
lines changed

1 file changed

+14
-25
lines changed

doc/src/sgml/plpgsql.sgml

+14-25
Original file line numberDiff line numberDiff line change
@@ -2641,18 +2641,9 @@ SELECT merge_db(1, 'dennis');
26412641
expected.
26422642
</para>
26432643
</example>
2644-
</sect2>
2645-
2646-
<sect2 id="plpgsql-diagnostics">
2647-
<title>Getting Diagnostics Information</title>
2648-
2649-
<indexterm>
2650-
<primary>diagnostics</primary>
2651-
<secondary>in PL/pgSQL</secondary>
2652-
</indexterm>
26532644

26542645
<sect3 id="plpgsql-exception-diagnostics">
2655-
<title>Obtaining information about an error</title>
2646+
<title>Obtaining Information About an Error</title>
26562647

26572648
<para>
26582649
Exception handlers frequently need to identify the specific error that
@@ -2686,7 +2677,7 @@ GET STACKED DIAGNOSTICS <replaceable>variable</replaceable> { = | := } <replacea
26862677
</para>
26872678

26882679
<table id="plpgsql-exception-diagnostics-values">
2689-
<title>Error diagnostics values</title>
2680+
<title>Error Diagnostics Values</title>
26902681
<tgroup cols="3">
26912682
<thead>
26922683
<row>
@@ -2704,17 +2695,17 @@ GET STACKED DIAGNOSTICS <replaceable>variable</replaceable> { = | := } <replacea
27042695
<row>
27052696
<entry><literal>COLUMN_NAME</literal></entry>
27062697
<entry>text</entry>
2707-
<entry>the name of column related to exception</entry>
2698+
<entry>the name of the column related to exception</entry>
27082699
</row>
27092700
<row>
27102701
<entry><literal>CONSTRAINT_NAME</literal></entry>
27112702
<entry>text</entry>
2712-
<entry>the name of constraint related to exception</entry>
2703+
<entry>the name of the constraint related to exception</entry>
27132704
</row>
27142705
<row>
27152706
<entry><literal>PG_DATATYPE_NAME</literal></entry>
27162707
<entry>text</entry>
2717-
<entry>the name of data type related to exception</entry>
2708+
<entry>the name of the data type related to exception</entry>
27182709
</row>
27192710
<row>
27202711
<entry><literal>MESSAGE_TEXT</literal></entry>
@@ -2724,12 +2715,12 @@ GET STACKED DIAGNOSTICS <replaceable>variable</replaceable> { = | := } <replacea
27242715
<row>
27252716
<entry><literal>TABLE_NAME</literal></entry>
27262717
<entry>text</entry>
2727-
<entry>the name of table related to exception</entry>
2718+
<entry>the name of the table related to exception</entry>
27282719
</row>
27292720
<row>
27302721
<entry><literal>SCHEMA_NAME</literal></entry>
27312722
<entry>text</entry>
2732-
<entry>the name of schema related to exception</entry>
2723+
<entry>the name of the schema related to exception</entry>
27332724
</row>
27342725
<row>
27352726
<entry><literal>PG_EXCEPTION_DETAIL</literal></entry>
@@ -2773,17 +2764,16 @@ END;
27732764
</programlisting>
27742765
</para>
27752766
</sect3>
2767+
</sect2>
27762768

2777-
<sect3 id="plpgsql-get-diagnostics-context">
2778-
<title>Obtaining the call stack context information</title>
2779-
2780-
<para>
2769+
<sect2 id="plpgsql-get-diagnostics-context">
2770+
<title>Obtaining the Call Stack Context Information</title>
27812771

27822772
<synopsis>
27832773
GET <optional> CURRENT </optional> DIAGNOSTICS <replaceable>variable</replaceable> { = | := } <replaceable>PG_CONTEXT</replaceable> <optional> , ... </optional>;
27842774
</synopsis>
27852775

2786-
2776+
<para>
27872777
Calling <command>GET DIAGNOSTICS</command> with status
27882778
item <varname>PG_CONTEXT</> will return a text string with line(s) of
27892779
text describing the call stack. The first row refers to the
@@ -2820,7 +2810,6 @@ PL/pgSQL function outer_func() line 3 at RETURN
28202810
</programlisting>
28212811

28222812
</para>
2823-
</sect3>
28242813
</sect2>
28252814
</sect1>
28262815

@@ -3567,7 +3556,7 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id;
35673556
</indexterm>
35683557

35693558
<sect2 id="plpgsql-dml-trigger">
3570-
<title>Triggers on data changes</title>
3559+
<title>Triggers on Data Changes</title>
35713560

35723561
<para>
35733562
<application>PL/pgSQL</application> can be used to define trigger
@@ -4119,7 +4108,7 @@ SELECT * FROM sales_summary_bytime;
41194108
</sect2>
41204109

41214110
<sect2 id="plpgsql-event-trigger">
4122-
<title>Triggers on events</title>
4111+
<title>Triggers on Events</title>
41234112

41244113
<para>
41254114
<application>PL/pgSQL</application> can be used to define event
@@ -4712,7 +4701,7 @@ a_output := a_output || $$ if v_$$ || referrer_keys.kind || $$ like '$$
47124701

47134702
</sect2>
47144703
<sect2 id="plpgsql-extra-checks">
4715-
<title>Additional compile-time checks</title>
4704+
<title>Additional Compile-time Checks</title>
47164705

47174706
<para>
47184707
To aid the user in finding instances of simple but common problems before

0 commit comments

Comments
 (0)