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
a7920b87
Commit
a7920b87
authored
Feb 26, 2015
by
Fujii Masao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note about how to make the SRF detoasted arguments live accross calls.
Andrew Gierth and Ali Akbar
parent
f5ef00ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
doc/src/sgml/xfunc.sgml
doc/src/sgml/xfunc.sgml
+14
-0
No files found.
doc/src/sgml/xfunc.sgml
View file @
a7920b87
...
@@ -2981,6 +2981,20 @@ SRF_RETURN_DONE(funcctx)
...
@@ -2981,6 +2981,20 @@ SRF_RETURN_DONE(funcctx)
<structfield>multi_call_memory_ctx</> while doing the first-call setup.
<structfield>multi_call_memory_ctx</> while doing the first-call setup.
</para>
</para>
<warning>
<para>
While the actual arguments to the function remain unchanged between
calls, if you detoast the argument values (which is normally done
transparently by the
<function>PG_GETARG_<replaceable>xxx</replaceable></function> macro)
in the transient context then the detoasted copies will be freed on
each cycle. Accordingly, if you keep references to such values in
your <structfield>user_fctx</>, you must either copy them into the
<structfield>multi_call_memory_ctx</> after detoasting, or ensure
that you detoast the values only in that context.
</para>
</warning>
<para>
<para>
A complete pseudo-code example looks like the following:
A complete pseudo-code example looks like the following:
<programlisting>
<programlisting>
...
...
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