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
1b84441a
Commit
1b84441a
authored
Oct 19, 2006
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Marginal improvement in logging: include the function name when logging
a fastpath function call.
parent
4887f5f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
src/backend/tcop/fastpath.c
src/backend/tcop/fastpath.c
+14
-12
No files found.
src/backend/tcop/fastpath.c
View file @
1b84441a
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.9
3 2006/10/04 00:29:58 momjian
Exp $
* $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.9
4 2006/10/19 22:44:11 tgl
Exp $
*
* NOTES
* This cruft is the server side of PQfn.
...
...
@@ -51,6 +51,7 @@ struct fp_info
Oid
namespace
;
/* other stuff from pg_proc */
Oid
rettype
;
Oid
argtypes
[
FUNC_MAX_ARGS
];
char
fname
[
NAMEDATALEN
];
/* function name for logging */
};
...
...
@@ -229,6 +230,7 @@ fetch_fp_info(Oid func_id, struct fp_info * fip)
fip
->
namespace
=
pp
->
pronamespace
;
fip
->
rettype
=
pp
->
prorettype
;
memcpy
(
fip
->
argtypes
,
pp
->
proargtypes
.
values
,
pp
->
pronargs
*
sizeof
(
Oid
));
strlcpy
(
fip
->
fname
,
NameStr
(
pp
->
proname
),
NAMEDATALEN
);
ReleaseSysCache
(
func_htp
);
...
...
@@ -316,15 +318,6 @@ HandleFunctionRequest(StringInfo msgBuf)
fid
=
(
Oid
)
pq_getmsgint
(
msgBuf
,
4
);
/* function oid */
/* Log as soon as we have the function OID */
if
(
log_statement
==
LOGSTMT_ALL
)
{
ereport
(
LOG
,
(
errmsg
(
"fastpath function call: function OID %u"
,
fid
)));
was_logged
=
true
;
}
/*
* There used to be a lame attempt at caching lookup info here. Now we
* just do the lookups on every call.
...
...
@@ -332,6 +325,15 @@ HandleFunctionRequest(StringInfo msgBuf)
fip
=
&
my_fp
;
fetch_fp_info
(
fid
,
fip
);
/* Log as soon as we have the function OID and name */
if
(
log_statement
==
LOGSTMT_ALL
)
{
ereport
(
LOG
,
(
errmsg
(
"fastpath function call:
\"
%s
\"
(OID %u)"
,
fip
->
fname
,
fid
)));
was_logged
=
true
;
}
/*
* Check permission to access and call function. Since we didn't go
* through a normal name lookup, we need to check schema usage too.
...
...
@@ -404,8 +406,8 @@ HandleFunctionRequest(StringInfo msgBuf)
break
;
case
2
:
ereport
(
LOG
,
(
errmsg
(
"duration: %s ms fastpath function call:
function OID %u
"
,
msec_str
,
fid
)));
(
errmsg
(
"duration: %s ms fastpath function call:
\"
%s
\"
(OID %u)
"
,
msec_str
,
fi
p
->
fname
,
fi
d
)));
break
;
}
...
...
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