Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0923b01

Browse files
committed
Update 9.4 release notes.
Set release date, do a final pass of wordsmithing, improve some othernew-in-9.4 documentation.
1 parentc50423c commit0923b01

File tree

3 files changed

+143
-170
lines changed

3 files changed

+143
-170
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,9 +3180,10 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
31803180
</indexterm>
31813181

31823182
<para>
3183-
Lines (<type>line</type>) are represented by the linear equation Ax + By
3184-
+ C = 0, where A and B are not both zero. Values of
3185-
type <type>line</type> is input and output in the following form:
3183+
Lines are represented by the linear
3184+
equation <replaceable>A</>x + <replaceable>B</>y + <replaceable>C</> = 0,
3185+
where <replaceable>A</> and <replaceable>B</> are not both zero. Values
3186+
of type <type>line</type> are input and output in the following form:
31863187
<synopsis>
31873188
{ <replaceable>A</replaceable>, <replaceable>B</replaceable>, <replaceable>C</replaceable> }
31883189
</synopsis>
@@ -3200,7 +3201,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
32003201
<literal>(<replaceable>x1</replaceable>,<replaceable>y1</replaceable>)</literal>
32013202
and
32023203
<literal>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</literal>
3203-
are two(different) points on the line.
3204+
are two different points on the line.
32043205
</para>
32053206
</sect2>
32063207

@@ -3216,9 +3217,9 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
32163217
</indexterm>
32173218

32183219
<para>
3219-
Line segments(<type>lseg</type>)are represented by pairs of points.
3220-
Values of type <type>lseg</type> are specified using any of the following
3221-
syntaxes:
3220+
Line segments are represented by pairs of points that are the endpoints
3221+
of the segment.Values of type <type>lseg</type> are specified using any
3222+
of the followingsyntaxes:
32223223

32233224
<synopsis>
32243225
[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) ]

‎doc/src/sgml/plpgsql.sgml

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,15 +1078,26 @@ END;
10781078
always sets <literal>FOUND</literal> to true.
10791079
</para>
10801080

1081+
<para>
1082+
For <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> with
1083+
<literal>RETURNING</>, <application>PL/pgSQL</application> reports
1084+
an error for more than one returned row, even when
1085+
<literal>STRICT</literal> is not specified. This is because there
1086+
is no option such as <literal>ORDER BY</> with which to determine
1087+
which affected row should be returned.
1088+
</para>
1089+
10811090
<para>
10821091
If <literal>print_strict_params</> is enabled for the function,
1083-
you will get information about the parameters passed to the
1084-
query in the <literal>DETAIL</> part of the error message produced
1085-
when the requirements of STRICT are not met. You can change this
1086-
setting on a system-wide basis by setting
1092+
then when an error is thrown because the requirements
1093+
of <literal>STRICT</> are not met, the <literal>DETAIL</> part of
1094+
the error message will include information about the parameters
1095+
passed to the query.
1096+
You can change the <literal>print_strict_params</>
1097+
setting for all functions by setting
10871098
<varname>plpgsql.print_strict_params</>, though only subsequent
10881099
function compilations will be affected. You can also enable it
1089-
on a per-function basis by using a compiler option:
1100+
on a per-function basis by using a compiler option, for example:
10901101
<programlisting>
10911102
CREATE FUNCTION get_userid(username text) RETURNS int
10921103
AS $$
@@ -1100,15 +1111,12 @@ BEGIN
11001111
END
11011112
$$ LANGUAGE plpgsql;
11021113
</programlisting>
1103-
</para>
1104-
1105-
<para>
1106-
For <command>INSERT</>/<command>UPDATE</>/<command>DELETE</> with
1107-
<literal>RETURNING</>, <application>PL/pgSQL</application> reports
1108-
an error for more than one returned row, even when
1109-
<literal>STRICT</literal> is not specified. This is because there
1110-
is no option such as <literal>ORDER BY</> with which to determine
1111-
which affected row should be returned.
1114+
On failure, this function might produce an error message such as
1115+
<programlisting>
1116+
ERROR: query returned no rows
1117+
DETAIL: parameters: $1 = 'nosuchuser'
1118+
CONTEXT: PL/pgSQL function get_userid(text) line 6 at SQL statement
1119+
</programlisting>
11121120
</para>
11131121

11141122
<note>
@@ -2767,28 +2775,36 @@ END;
27672775
</sect2>
27682776

27692777
<sect2 id="plpgsql-get-diagnostics-context">
2770-
<title>Obtaining the Call Stack Context Information</title>
2778+
<title>Obtaining Current Execution Information</title>
2779+
2780+
<para>
2781+
The <command>GET <optional> CURRENT </optional> DIAGNOSTICS</command>
2782+
command retrieves information about current execution state (whereas
2783+
the <command>GET STACKED DIAGNOSTICS</command> command discussed above
2784+
reports information about the execution state as of a previous error).
2785+
This command has the form:
2786+
</para>
27712787

27722788
<synopsis>
2773-
GET <optional> CURRENT </optional> DIAGNOSTICS <replaceable>variable</replaceable> { = | := } <replaceable>PG_CONTEXT</replaceable> <optional> , ... </optional>;
2789+
GET <optional> CURRENT </optional> DIAGNOSTICS <replaceable>variable</replaceable> { = | := } <replaceable>item</replaceable> <optional> , ... </optional>;
27742790
</synopsis>
27752791

27762792
<para>
2777-
Calling <command>GET DIAGNOSTICS</command> with status
2778-
item <varname>PG_CONTEXT</> will return a text string with line(s) of
2779-
text describing the call stack. The firstrow refers to the
2793+
Currently only one information item is supported. Status
2794+
item <literal>PG_CONTEXT</> will return a text string with line(s) of
2795+
text describing the call stack. The firstline refers to the
27802796
current function and currently executing <command>GET DIAGNOSTICS</command>
2781-
command. The second and any subsequentrows refer to the calling functions
2782-
up the call stack.
2797+
command. The second and any subsequentlines refer to calling functions
2798+
furtherup the call stack. For example:
27832799

27842800
<programlisting>
2785-
CREATE OR REPLACE FUNCTIONpublic.outer_func() RETURNS integer AS $$
2801+
CREATE OR REPLACE FUNCTION outer_func() RETURNS integer AS $$
27862802
BEGIN
27872803
RETURN inner_func();
27882804
END;
27892805
$$ LANGUAGE plpgsql;
27902806

2791-
CREATE OR REPLACE FUNCTIONpublic.inner_func() RETURNS integer AS $$
2807+
CREATE OR REPLACE FUNCTION inner_func() RETURNS integer AS $$
27922808
DECLARE
27932809
stack text;
27942810
BEGIN
@@ -2801,8 +2817,9 @@ $$ LANGUAGE plpgsql;
28012817
SELECT outer_func();
28022818

28032819
NOTICE: --- Call Stack ---
2804-
PL/pgSQL function inner_func() line4 at GET DIAGNOSTICS
2820+
PL/pgSQL function inner_func() line5 at GET DIAGNOSTICS
28052821
PL/pgSQL function outer_func() line 3 at RETURN
2822+
CONTEXT: PL/pgSQL function outer_func() line 3 at RETURN
28062823
outer_func
28072824
------------
28082825
1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp