git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ecd70d7) | patch
Modify hash_search() API to prevent future occurrences of the error
2005年5月29日 04:23:07 +0000 (04:23 +0000)
2005年5月29日 04:23:07 +0000 (04:23 +0000)
commit e92a88272eb2b164e7e8c625ad3f7ad267e0224f
Modify hash_search() API to prevent future occurrences of the error
spotted by Qingqing Zhou. The HASH_ENTER action now automatically
fails with elog(ERROR) on out-of-memory --- which incidentally lets
us eliminate duplicate error checks in quite a bunch of places. If
you really need the old return-NULL-on-out-of-memory behavior, you
can ask for HASH_ENTER_NULL. But there is now an Assert in that path
checking that you aren't hoping to get that behavior in a palloc-based
hash table.
Along the way, remove the old HASH_FIND_SAVE/HASH_REMOVE_SAVED actions,
which were not being used anywhere anymore, and were surely too ugly
and unsafe to want to see revived again.
23 files changed:
contrib/dblink/dblink.c diff | blob | blame | history
contrib/tablefunc/tablefunc.c diff | blob | blame | history
src/backend/access/transam/xlogutils.c diff | blob | blame | history
src/backend/commands/prepare.c diff | blob | blame | history
src/backend/executor/execGrouping.c diff | blob | blame | history
src/backend/nodes/tidbitmap.c diff | blob | blame | history
src/backend/postmaster/pgstat.c diff | blob | blame | history
src/backend/storage/buffer/buf_table.c diff | blob | blame | history
src/backend/storage/buffer/localbuf.c diff | blob | blame | history
src/backend/storage/freespace/freespace.c diff | blob | blame | history
src/backend/storage/ipc/shmem.c diff | blob | blame | history
src/backend/storage/lmgr/lock.c diff | blob | blame | history
src/backend/storage/smgr/md.c diff | blob | blame | history
src/backend/storage/smgr/smgr.c diff | blob | blame | history
src/backend/utils/adt/ri_triggers.c diff | blob | blame | history
src/backend/utils/cache/relcache.c diff | blob | blame | history
src/backend/utils/cache/typcache.c diff | blob | blame | history
src/backend/utils/fmgr/fmgr.c diff | blob | blame | history
src/backend/utils/hash/dynahash.c diff | blob | blame | history
src/backend/utils/mmgr/portalmem.c diff | blob | blame | history
src/include/utils/hsearch.h diff | blob | blame | history
src/pl/plpgsql/src/pl_comp.c diff | blob | blame | history
src/timezone/pgtz.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /