From 77acab75dfe2e4741c25c0cf550266caef1eebd2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 28 Apr 2010 16:54:16 +0000 Subject: Modify ShmemInitStruct and ShmemInitHash to throw errors internally, rather than returning NULL for some-but-not-all failures as they used to. Remove now-redundant tests for NULL from call sites. We had to do something about this because many call sites were failing to check for NULL; and changing it like this seems a lot more useful and mistake-proof than adding checks to the call sites without them. --- doc/src/sgml/xfunc.sgml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index fcf9e3b1d49..1b771c5ecbf 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -1,4 +1,4 @@ - + User-Defined Functions @@ -3350,8 +3350,6 @@ void RequestAddinLWLocks(int n) LWLockAcquire(AddinShmemInitLock, LW_EXCLUSIVE); ptr = ShmemInitStruct("my struct name", size, &found); - if (!ptr) - elog(ERROR, "out of shared memory"); if (!found) { initialize contents of shmem area; -- cgit v1.2.3