Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0332993c
Commit
0332993c
authored
Jun 09, 2017
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: Improve types in example
Reported-by:
Nikolaus Thiel
<
klt@fsfe.org
>
parent
0933fcee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
doc/src/sgml/xfunc.sgml
doc/src/sgml/xfunc.sgml
+3
-3
No files found.
doc/src/sgml/xfunc.sgml
View file @
0332993c
...
...
@@ -302,7 +302,7 @@ SELECT add_em(1, 2) AS answer;
bank account:
<programlisting>
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS
integer
AS $$
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS
numeric
AS $$
UPDATE bank
SET balance = balance - debit
WHERE accountno = tf1.accountno;
...
...
@@ -333,7 +333,7 @@ SELECT tf1(17, 100.0);
is:
<programlisting>
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS
integer
AS $$
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS
numeric
AS $$
UPDATE bank
SET balance = balance - debit
WHERE accountno = tf1.accountno;
...
...
@@ -345,7 +345,7 @@ $$ LANGUAGE SQL;
The same thing could be done in one command using <literal>RETURNING</>:
<programlisting>
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS
integer
AS $$
CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS
numeric
AS $$
UPDATE bank
SET balance = balance - debit
WHERE accountno = tf1.accountno
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment