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
a7021591
Commit
a7021591
authored
Jul 13, 2007
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add casts to suppress warnings about m68k-specific kluge in fmgr.c.
parent
04b54876
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
141 additions
and
75 deletions
+141
-75
src/backend/utils/fmgr/fmgr.c
src/backend/utils/fmgr/fmgr.c
+141
-75
No files found.
src/backend/utils/fmgr/fmgr.c
View file @
a7021591
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.10
6 2007/04/06 04:21:43
tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.10
7 2007/07/13 02:25:48
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -38,7 +38,8 @@
* declare the function pointer to return int, so the compiler picks up the
* return value from %d0. (Functions returning pointers put their value
* *additionally* into %d0 for compatibility.) The price is that there are
* some warnings about int->pointer conversions...
* some warnings about int->pointer conversions ... which we can suppress
* with suitably ugly casts in fmgr_oldstyle().
*/
#if (defined(__mc68000__) || (defined(__m68k__))) && defined(__ELF__)
typedef
int32
(
*
func_ptr
)
();
...
...
@@ -626,7 +627,7 @@ fmgr_oldstyle(PG_FUNCTION_ARGS)
switch
(
n_arguments
)
{
case
0
:
returnValue
=
(
*
user_fn
)
();
returnValue
=
(
char
*
)
(
*
user_fn
)
();
break
;
case
1
:
...
...
@@ -635,108 +636,173 @@ fmgr_oldstyle(PG_FUNCTION_ARGS)
* there are other functions still out there that also rely on
* this undocumented hack?
*/
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
&
fcinfo
->
isnull
);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
&
fcinfo
->
isnull
);
break
;
case
2
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
]);
break
;
case
3
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
]);
break
;
case
4
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
]);
break
;
case
5
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
]);
break
;
case
6
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
]);
break
;
case
7
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
]);
break
;
case
8
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
]);
break
;
case
9
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
]);
break
;
case
10
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
]);
break
;
case
11
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
]);
break
;
case
12
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
]);
break
;
case
13
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
]);
break
;
case
14
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
],
fcinfo
->
arg
[
13
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
],
fcinfo
->
arg
[
13
]);
break
;
case
15
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
],
fcinfo
->
arg
[
13
],
fcinfo
->
arg
[
14
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
],
fcinfo
->
arg
[
13
],
fcinfo
->
arg
[
14
]);
break
;
case
16
:
returnValue
=
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
],
fcinfo
->
arg
[
13
],
fcinfo
->
arg
[
14
],
fcinfo
->
arg
[
15
]);
returnValue
=
(
char
*
)
(
*
user_fn
)
(
fcinfo
->
arg
[
0
],
fcinfo
->
arg
[
1
],
fcinfo
->
arg
[
2
],
fcinfo
->
arg
[
3
],
fcinfo
->
arg
[
4
],
fcinfo
->
arg
[
5
],
fcinfo
->
arg
[
6
],
fcinfo
->
arg
[
7
],
fcinfo
->
arg
[
8
],
fcinfo
->
arg
[
9
],
fcinfo
->
arg
[
10
],
fcinfo
->
arg
[
11
],
fcinfo
->
arg
[
12
],
fcinfo
->
arg
[
13
],
fcinfo
->
arg
[
14
],
fcinfo
->
arg
[
15
]);
break
;
default:
...
...
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