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
fa3aa5e1
Commit
fa3aa5e1
authored
Jan 11, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrong boundary condition on number-of-args check.
parent
cc2e19ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
18 deletions
+5
-18
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_proc.c
+5
-18
No files found.
src/backend/catalog/pg_proc.c
View file @
fa3aa5e1
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.3
8 2000/01/11 02:30:05 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.3
9 2000/01/11 05:22:25 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -80,8 +80,9 @@ ProcedureCreate(char *procedureName,
...
@@ -80,8 +80,9 @@ ProcedureCreate(char *procedureName,
{
{
Value
*
t
=
lfirst
(
x
);
Value
*
t
=
lfirst
(
x
);
if
(
parameterCount
>
FUNC_MAX_ARGS
)
if
(
parameterCount
>=
FUNC_MAX_ARGS
)
elog
(
ERROR
,
"Procedures cannot take more than %d arguments"
,
FUNC_MAX_ARGS
);
elog
(
ERROR
,
"Procedures cannot take more than %d arguments"
,
FUNC_MAX_ARGS
);
if
(
strcmp
(
strVal
(
t
),
"opaque"
)
==
0
)
if
(
strcmp
(
strVal
(
t
),
"opaque"
)
==
0
)
{
{
...
@@ -172,7 +173,6 @@ ProcedureCreate(char *procedureName,
...
@@ -172,7 +173,6 @@ ProcedureCreate(char *procedureName,
elog
(
ERROR
,
"ProcedureCreate: sql functions cannot return type
\"
opaque
\"
"
);
elog
(
ERROR
,
"ProcedureCreate: sql functions cannot return type
\"
opaque
\"
"
);
typeObjectId
=
0
;
typeObjectId
=
0
;
}
}
else
else
{
{
typeObjectId
=
TypeGet
(
returnTypeName
,
&
defined
);
typeObjectId
=
TypeGet
(
returnTypeName
,
&
defined
);
...
@@ -192,7 +192,6 @@ ProcedureCreate(char *procedureName,
...
@@ -192,7 +192,6 @@ ProcedureCreate(char *procedureName,
returnTypeName
);
returnTypeName
);
}
}
}
}
else
if
(
!
defined
)
else
if
(
!
defined
)
{
{
elog
(
NOTICE
,
"ProcedureCreate: return type '%s' is only a shell"
,
elog
(
NOTICE
,
"ProcedureCreate: return type '%s' is only a shell"
,
...
@@ -266,30 +265,18 @@ ProcedureCreate(char *procedureName,
...
@@ -266,30 +265,18 @@ ProcedureCreate(char *procedureName,
values
[
i
++
]
=
NameGetDatum
(
&
procname
);
values
[
i
++
]
=
NameGetDatum
(
&
procname
);
values
[
i
++
]
=
Int32GetDatum
(
GetUserId
());
values
[
i
++
]
=
Int32GetDatum
(
GetUserId
());
values
[
i
++
]
=
ObjectIdGetDatum
(
languageObjectId
);
values
[
i
++
]
=
ObjectIdGetDatum
(
languageObjectId
);
/* XXX isinherited is always false for now */
/* XXX isinherited is always false for now */
values
[
i
++
]
=
Int8GetDatum
((
bool
)
0
);
values
[
i
++
]
=
Int8GetDatum
((
bool
)
0
);
/* XXX istrusted is always false for now */
values
[
i
++
]
=
Int8GetDatum
(
trusted
);
values
[
i
++
]
=
Int8GetDatum
(
trusted
);
values
[
i
++
]
=
Int8GetDatum
(
canCache
);
values
[
i
++
]
=
Int8GetDatum
(
canCache
);
values
[
i
++
]
=
UInt16GetDatum
(
parameterCount
);
values
[
i
++
]
=
UInt16GetDatum
(
parameterCount
);
values
[
i
++
]
=
Int8GetDatum
(
returnsSet
);
values
[
i
++
]
=
Int8GetDatum
(
returnsSet
);
values
[
i
++
]
=
ObjectIdGetDatum
(
typeObjectId
);
values
[
i
++
]
=
ObjectIdGetDatum
(
typeObjectId
);
values
[
i
++
]
=
(
Datum
)
typev
;
values
[
i
++
]
=
(
Datum
)
typev
;
/*
* The following assignments of constants are made. The real values
* will have to be extracted from the arglist someday soon.
*/
values
[
i
++
]
=
Int32GetDatum
(
byte_pct
);
/* probyte_pct */
values
[
i
++
]
=
Int32GetDatum
(
byte_pct
);
/* probyte_pct */
values
[
i
++
]
=
Int32GetDatum
(
perbyte_cpu
);
/* properbyte_cpu */
values
[
i
++
]
=
Int32GetDatum
(
perbyte_cpu
);
/* properbyte_cpu */
values
[
i
++
]
=
Int32GetDatum
(
percall_cpu
);
/* propercall_cpu */
values
[
i
++
]
=
Int32GetDatum
(
percall_cpu
);
/* propercall_cpu */
values
[
i
++
]
=
Int32GetDatum
(
outin_ratio
);
/* prooutin_ratio */
values
[
i
++
]
=
Int32GetDatum
(
outin_ratio
);
/* prooutin_ratio */
values
[
i
++
]
=
(
Datum
)
fmgr
(
F_TEXTIN
,
prosrc
);
/* prosrc */
values
[
i
++
]
=
(
Datum
)
fmgr
(
F_TEXTIN
,
prosrc
);
/* prosrc */
values
[
i
++
]
=
(
Datum
)
fmgr
(
F_TEXTIN
,
probin
);
/* probin */
values
[
i
++
]
=
(
Datum
)
fmgr
(
F_TEXTIN
,
probin
);
/* probin */
...
...
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