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
f28d9b10
Commit
f28d9b10
authored
Jun 19, 2014
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document SQL functions' behavior of parsing the whole function at once.
Haribabu Kommi, somewhat rewritten by me
parent
bfaa8c66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
doc/src/sgml/xfunc.sgml
doc/src/sgml/xfunc.sgml
+15
-0
No files found.
doc/src/sgml/xfunc.sgml
View file @
f28d9b10
...
...
@@ -143,6 +143,21 @@ SELECT clean_emp();
</screen>
</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>
The syntax of the <command>CREATE FUNCTION</command> command requires
the function body to be written as a string constant. It is usually
...
...
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