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

Commit0332993

Browse files
committed
doc: Improve types in example
Reported-by: Nikolaus Thiel <klt@fsfe.org>
1 parent0933fce commit0332993

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎doc/src/sgml/xfunc.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ SELECT add_em(1, 2) AS answer;
302302
bank account:
303303

304304
<programlisting>
305-
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNSinteger AS $$
305+
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNSnumeric AS $$
306306
UPDATE bank
307307
SET balance = balance - debit
308308
WHERE accountno = tf1.accountno;
@@ -333,7 +333,7 @@ SELECT tf1(17, 100.0);
333333
is:
334334

335335
<programlisting>
336-
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNSinteger AS $$
336+
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNSnumeric AS $$
337337
UPDATE bank
338338
SET balance = balance - debit
339339
WHERE accountno = tf1.accountno;
@@ -345,7 +345,7 @@ $$ LANGUAGE SQL;
345345
The same thing could be done in one command using <literal>RETURNING</>:
346346

347347
<programlisting>
348-
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNSinteger AS $$
348+
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNSnumeric AS $$
349349
UPDATE bank
350350
SET balance = balance - debit
351351
WHERE accountno = tf1.accountno

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp