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
63d5fd17
Commit
63d5fd17
authored
Jan 31, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inline fmgr_faddr() for speed.
parent
726c3854
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
src/backend/utils/Gen_fmgrtab.sh.in
src/backend/utils/Gen_fmgrtab.sh.in
+16
-6
src/backend/utils/fmgr/fmgr.c
src/backend/utils/fmgr/fmgr.c
+3
-9
No files found.
src/backend/utils/Gen_fmgrtab.sh.in
View file @
63d5fd17
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.
6 1998/01/15 19:44:50 pgsql
Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.
7 1998/01/31 05:22:41 momjian
Exp $
#
#
# NOTES
# NOTES
# Passes any -D options on to cpp prior to generating the list
# Passes any -D options on to cpp prior to generating the list
...
@@ -81,7 +81,7 @@ cat > $HFILE <<FuNkYfMgRsTuFf
...
@@ -81,7 +81,7 @@ cat > $HFILE <<FuNkYfMgRsTuFf
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
*
$Id
: Gen_fmgrtab.sh.in,v 1.
6 1998/01/15 19:44:50 pgsql
Exp $
*
$Id
: Gen_fmgrtab.sh.in,v 1.
7 1998/01/31 05:22:41 momjian
Exp $
*
*
* NOTES
* NOTES
* ******************************
* ******************************
...
@@ -123,7 +123,6 @@ typedef struct {
...
@@ -123,7 +123,6 @@ typedef struct {
*/
*/
extern char *fmgr_c(FmgrInfo *finfo, FmgrValues *values, bool *isNull);
extern char *fmgr_c(FmgrInfo *finfo, FmgrValues *values, bool *isNull);
extern void fmgr_info(Oid procedureId, FmgrInfo *finfo);
extern void fmgr_info(Oid procedureId, FmgrInfo *finfo);
extern func_ptr fmgr_faddr(FmgrInfo *finfo);
extern char *fmgr(Oid procedureId, ... );
extern char *fmgr(Oid procedureId, ... );
extern char *fmgr_ptr(FmgrInfo *finfo, ... );
extern char *fmgr_ptr(FmgrInfo *finfo, ... );
extern char *fmgr_array_args(Oid procedureId, int nargs,
extern char *fmgr_array_args(Oid procedureId, int nargs,
...
@@ -135,7 +134,6 @@ extern char *fmgr_array_args(Oid procedureId, int nargs,
...
@@ -135,7 +134,6 @@ extern char *fmgr_array_args(Oid procedureId, int nargs,
extern func_ptr fmgr_dynamic(Oid procedureId, int *pronargs);
extern func_ptr fmgr_dynamic(Oid procedureId, int *pronargs);
extern void load_file(char *filename);
extern void load_file(char *filename);
/*
/*
* For performance reasons, we often want to simply jump through a
* For performance reasons, we often want to simply jump through a
* a function pointer (if it's valid, that is). These calls have
* a function pointer (if it's valid, that is). These calls have
...
@@ -143,12 +141,24 @@ extern void load_file(char *filename);
...
@@ -143,12 +141,24 @@ extern void load_file(char *filename);
* sanity-checking (and so we can track them down more easily when
* sanity-checking (and so we can track them down more easily when
* we must).
* we must).
*/
*/
#define fmgr_faddr(finfo)
\
(
\
fmgr_pl_finfo = (finfo),
\
(func_ptr)(finfo)->fn_addr
\
)
#ifdef TRACE_FMGR_PTR
#ifdef TRACE_FMGR_PTR
#define FMGR_PTR2(FINFO, ARG1, ARG2)
\
#define FMGR_PTR2(FINFO, ARG1, ARG2)
\
fmgr_ptr(FINFO, 2, ARG1, ARG2)
fmgr_ptr(FINFO, 2, ARG1, ARG2)
#else
#else
#define FMGR_PTR2(FINFO, ARG1, ARG2)
\
#define FMGR_PTR2(FINFO, ARG1, ARG2)
\
(((FINFO)->fn_addr) ? (*(fmgr_faddr(FINFO)))(ARG1, ARG2) : fmgr((FINFO)->fn_oid, ARG1, ARG2))
(
\
((FINFO)->fn_addr) ?
\
(*(fmgr_faddr(FINFO)))(ARG1, ARG2)
\
:
\
fmgr((FINFO)->fn_oid, ARG1, ARG2)
\
)
#endif
#endif
/*
/*
...
@@ -182,7 +192,7 @@ cat > $TABCFILE <<FuNkYfMgRtAbStUfF
...
@@ -182,7 +192,7 @@ cat > $TABCFILE <<FuNkYfMgRtAbStUfF
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
*
$Header
: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.
6 1998/01/15 19:44:50 pgsql
Exp $
*
$Header
: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.
7 1998/01/31 05:22:41 momjian
Exp $
*
*
* NOTES
* NOTES
*
*
...
...
src/backend/utils/fmgr/fmgr.c
View file @
63d5fd17
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.1
1 1998/01/15 22:31:3
3 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.1
2 1998/01/31 05:22:4
3 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
#include "commands/trigger.h"
#include "commands/trigger.h"
static
FmgrInfo
*
fmgr_pl_finfo
;
/* We don't make this static so fmgr_faddr() macros can access it */
FmgrInfo
*
fmgr_pl_finfo
;
static
char
*
static
char
*
fmgr_pl
(
char
*
arg0
,
...)
fmgr_pl
(
char
*
arg0
,
...)
...
@@ -248,13 +249,6 @@ fmgr_info(Oid procedureId, FmgrInfo *finfo)
...
@@ -248,13 +249,6 @@ fmgr_info(Oid procedureId, FmgrInfo *finfo)
}
}
}
}
func_ptr
fmgr_faddr
(
FmgrInfo
*
finfo
)
{
fmgr_pl_finfo
=
finfo
;
return
finfo
->
fn_addr
;
}
/*
/*
* fmgr - return the value of a function call
* fmgr - return the value of a function call
*
*
...
...
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