diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-04-28 16:54:16 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-04-28 16:54:16 +0000 |
commit | 77acab75dfe2e4741c25c0cf550266caef1eebd2 (patch) | |
tree | 1a5d86661c9394e2e79ae038775e874395f24f59 /doc/src | |
parent | 5f70a04c56b69fff0f356abae3091eaa54038a5b (diff) | |
download | postgresql-77acab75dfe2e4741c25c0cf550266caef1eebd2.tar.gz postgresql-77acab75dfe2e4741c25c0cf550266caef1eebd2.zip |
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.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/xfunc.sgml | 4 |
1 files changed, 1 insertions, 3 deletions
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 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.145 2010/04/03 07:22:56 petere Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.146 2010/04/28 16:54:15 tgl Exp $ --> <sect1 id="xfunc"> <title>User-Defined Functions</title> @@ -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; |