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
72ed6ff5
Commit
72ed6ff5
authored
Jan 12, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In PQfn(), defend against too many args, and avoid dependency
on FUNC_MAX_ARGS by using an appropriate fmgr() call.
parent
ef899c7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/backend/libpq/be-pqexec.c
src/backend/libpq/be-pqexec.c
+7
-7
No files found.
src/backend/libpq/be-pqexec.c
View file @
72ed6ff5
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.2
8 2000/01/11 03:33:12 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.2
9 2000/01/12 05:27:20 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -58,12 +58,16 @@ PQfn(int fnid,
...
@@ -58,12 +58,16 @@ PQfn(int fnid,
{
{
char
*
retval
;
/* XXX - should be datum, maybe ? */
char
*
retval
;
/* XXX - should be datum, maybe ? */
char
*
arg
[
FUNC_MAX_ARGS
];
char
*
arg
[
FUNC_MAX_ARGS
];
bool
isNull
;
int
i
;
int
i
;
/* ----------------
/* ----------------
* fill args[] array
* fill args[] array
* ----------------
* ----------------
*/
*/
if
(
nargs
>
FUNC_MAX_ARGS
)
elog
(
ERROR
,
"functions cannot have more than %d arguments"
,
FUNC_MAX_ARGS
);
for
(
i
=
0
;
i
<
nargs
;
i
++
)
for
(
i
=
0
;
i
<
nargs
;
i
++
)
{
{
if
(
args
[
i
].
len
==
VAR_LENGTH_ARG
)
if
(
args
[
i
].
len
==
VAR_LENGTH_ARG
)
...
@@ -78,18 +82,14 @@ PQfn(int fnid,
...
@@ -78,18 +82,14 @@ PQfn(int fnid,
* call the postgres function manager
* call the postgres function manager
* ----------------
* ----------------
*/
*/
retval
=
(
char
*
)
retval
=
fmgr_array_args
(
fnid
,
nargs
,
arg
,
&
isNull
);
fmgr
(
fnid
,
arg
[
0
],
arg
[
1
],
arg
[
2
],
arg
[
3
],
arg
[
4
],
arg
[
5
],
arg
[
6
],
arg
[
7
],
arg
[
8
],
arg
[
9
],
arg
[
10
],
arg
[
11
],
arg
[
12
],
arg
[
13
],
arg
[
14
],
arg
[
15
]);
/* ----------------
/* ----------------
* put the result in the buffer the user specified and
* put the result in the buffer the user specified and
* return the proper code.
* return the proper code.
* ----------------
* ----------------
*/
*/
if
(
retval
==
(
char
*
)
NULL
)
/* void retval */
if
(
isNull
)
/* void retval */
return
"0"
;
return
"0"
;
if
(
result_is_int
)
if
(
result_is_int
)
...
...
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