summaryrefslogtreecommitdiff
path: root/contrib/dblink
diff options
context:
space:
mode:
authorNeil Conway2004-10-25 00:46:43 +0000
committerNeil Conway2004-10-25 00:46:43 +0000
commit8ec05b28b712fa4b2de5cc088ee978e05cd7e69a (patch)
tree3220f2edfd254450493b1977d8a1f374f93f70d4 /contrib/dblink
parent346aff04be3311cefc0570022f86d43622d85f5e (diff)
Modify hash_create() to elog(ERROR) if an error occurs, rather than
returning a NULL pointer (some callers remembered to check the return value, but some did not -- it is safer to just bail out). Also, cleanup pgstat.c to use elog(ERROR) rather than elog(LOG) followed by exit().
Diffstat (limited to 'contrib/dblink')
-rw-r--r--contrib/dblink/dblink.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 2b33043c5a2..f6c95ef1dcd 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -2043,19 +2043,11 @@ static HTAB *
createConnHash(void)
{
HASHCTL ctl;
- HTAB *ptr;
ctl.keysize = NAMEDATALEN;
ctl.entrysize = sizeof(remoteConnHashEnt);
- ptr = hash_create("Remote Con hash", NUMCONN, &ctl, HASH_ELEM);
-
- if (!ptr)
- ereport(ERROR,
- (errcode(ERRCODE_OUT_OF_MEMORY),
- errmsg("out of memory")));
-
- return (ptr);
+ return hash_create("Remote Con hash", NUMCONN, &ctl, HASH_ELEM);
}
static void