Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
f28d9b10
Commit
f28d9b10
authored
10 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Document SQL functions' behavior of parsing the whole function at once.
Haribabu Kommi, somewhat rewritten by me
parent
bfaa8c66
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/xfunc.sgml
+15
-0
15 additions, 0 deletions
doc/src/sgml/xfunc.sgml
with
15 additions
and
0 deletions
doc/src/sgml/xfunc.sgml
+
15
−
0
View file @
f28d9b10
...
@@ -143,6 +143,21 @@ SELECT clean_emp();
...
@@ -143,6 +143,21 @@ SELECT clean_emp();
</screen>
</screen>
</para>
</para>
<note>
<para>
The entire body of a SQL function is parsed before any of it is
executed. While a SQL function can contain commands that alter
the system catalogs (e.g., <command>CREATE TABLE</>), the effects
of such commands will not be visible during parse analysis of
later commands in the function. Thus, for example,
<literal>CREATE TABLE foo (...); INSERT INTO foo VALUES(...);</literal>
will not work as desired if packaged up into a single SQL function,
since <structname>foo</> won't exist yet when the <command>INSERT</>
command is parsed. It's recommended to use <application>PL/PgSQL</>
instead of a SQL function in this type of situation.
</para>
</note>
<para>
<para>
The syntax of the <command>CREATE FUNCTION</command> command requires
The syntax of the <command>CREATE FUNCTION</command> command requires
the function body to be written as a string constant. It is usually
the function body to be written as a string constant. It is usually
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment