projects
/
users
/
andresfreund
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94b36c8
)
WIP: Improve getBaseTypeAndTypemod() performance for builtin types.
simple_statement_perf
author
Andres Freund
<
[email protected]
>
Thu, 14 Sep 2017 02:29:45 +0000
(19:29 -0700)
committer
Andres Freund
<
[email protected]
>
Sun, 8 Oct 2017 16:41:56 +0000
(09:41 -0700)
Author: Robert Haas
Discussion: https://postgr.es/m/
src/backend/utils/cache/lsyscache.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/cache/lsyscache.c
b/src/backend/utils/cache/lsyscache.c
index b7a14dc87e14801029c82e690087c43f4843c481..2a22da148990811ed5a143c722dce32ded887959 100644
(file)
--- a/
src/backend/utils/cache/lsyscache.c
+++ b/
src/backend/utils/cache/lsyscache.c
@@
-2295,6
+2295,9
@@
getBaseTypeAndTypmod(Oid typid, int32 *typmod)
HeapTuple tup;
Form_pg_type typTup;
+ if (typid < FirstBootstrapObjectId)
+ break;
+
tup = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typid));
if (!HeapTupleIsValid(tup))
elog(ERROR, "cache lookup failed for type %u", typid);