Create a 'type cache' that keeps track of the data needed for any particular

Tom Lane <tgl@sss.pgh.pa.us>

Commit: ec646dbc65afc8c55118cb3fb75cb6fd18d78dd8
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2003-08-17T19:58:06Z
Releases: 7.4.1
Create a 'type cache'  that keeps track of the data needed for any particular
datatype by array_eq and array_cmp; use this to solve problems with memory
leaks in array indexing support.  The parser's equality_oper and ordering_oper
routines also use the cache.  Change the operator search algorithms to look
for appropriate btree or hash index opclasses, instead of assuming operators
named '<' or '=' have the right semantics.  (ORDER BY ASC/DESC now also look
at opclasses, instead of assuming '<' and '>' are the right things.)  Add
several more index opclasses so that there is no regression in functionality
for base datatypes.  initdb forced due to catalog additions.

Files

PathChange+/−
src/backend/commands/analyze.c modified +4 −11
src/backend/commands/indexcmds.c modified +3 −2
src/backend/commands/opclasscmds.c modified +4 −2
src/backend/nodes/copyfuncs.c modified +7 −6
src/backend/nodes/equalfuncs.c modified +5 −4
src/backend/optimizer/plan/createplan.c modified +4 −3
src/backend/optimizer/plan/planner.c modified +4 −2
src/backend/parser/gram.y modified +29 −16
src/backend/parser/parse_clause.c modified +29 −13
src/backend/parser/parse_oper.c modified +138 −74
src/backend/utils/adt/acl.c modified +18 −1
src/backend/utils/adt/arrayfuncs.c modified +59 −73
src/backend/utils/adt/cash.c modified +18 −1
src/backend/utils/adt/nabstime.c modified +115 −139
src/backend/utils/adt/ri_triggers.c modified +13 −63
src/backend/utils/adt/ruleutils.c modified +24 −11
src/backend/utils/cache/lsyscache.c modified +33 −20
src/backend/utils/cache/Makefile modified +2 −2
src/backend/utils/cache/typcache.c added +292 −0
src/backend/utils/sort/tuplesort.c modified +6 −16
src/include/catalog/catversion.h modified +2 −2
src/include/catalog/pg_amop.h modified +33 −1
src/include/catalog/pg_amproc.h modified +5 −1
src/include/catalog/pg_opclass.h modified +5 −1
src/include/catalog/pg_operator.h modified +3 −2
src/include/catalog/pg_proc.h modified +9 −1
src/include/nodes/nodes.h modified +2 −2
src/include/nodes/parsenodes.h modified +12 −7
src/include/parser/parse_clause.h modified +3 −2
src/include/parser/parse_oper.h modified +4 −3
src/include/utils/acl.h modified +2 −1
src/include/utils/builtins.h modified +3 −1
src/include/utils/cash.h modified +1 −0
src/include/utils/lsyscache.h modified +2 −1
src/include/utils/typcache.h added +66 −0
src/test/regress/expected/circle.out modified +1 −1
src/test/regress/expected/geometry_1.out modified +1 −1
src/test/regress/expected/geometry.out modified +1 −1
src/test/regress/sql/circle.sql modified +1 −2
src/test/regress/sql/geometry.sql modified +1 −2