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

Commitcf9fd80

Browse files
committed
Example for create function using argument names
Gavin Sherry
1 parentaf4de81 commitcf9fd80

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎doc/src/sgml/ref/create_function.sgml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.57 2004/06/25 07:05:34 dennis Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.58 2004/07/11 23:23:43 momjian Exp $
33
-->
44

55
<refentry id="SQL-CREATEFUNCTION">
@@ -398,6 +398,17 @@ CREATE FUNCTION add(integer, integer) RETURNS integer
398398
LANGUAGE SQL
399399
IMMUTABLE
400400
RETURNS NULL ON NULL INPUT;
401+
</programlisting>
402+
</para>
403+
404+
<para>
405+
Increment an integer, making use of an argument name, in PL/PgSQL:
406+
407+
<programlisting>
408+
CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS '
409+
BEGIN
410+
RETURN i + 1;
411+
END;' LANGUAGE plpgsql;
401412
</programlisting>
402413
</para>
403414
</refsect1>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp