Re: code cleanup for SearchSysCache - Mailing list pgsql-hackers

From Qingqing Zhou
Subject Re: code cleanup for SearchSysCache
Date
Msg-id e6ak9u$26od$1@news.hub.org
Whole thread Raw
In response to code cleanup for SearchSysCache  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Responses Re: code cleanup for SearchSysCache  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>
> You'd need two essentially equivalent versions of SearchSysCache, and
> you'd lose the ability to make the error message identify what was being
> searched for, so I vote no.
>

Both arguments are not necessarily true. This change is quite like what we
made to hash_search(). There is only one SearchSysCache() which will take an
extra argument "isComplain" (vs. HASH_ENTER_NULL). The error message can be
easily identified from the first parameter "cacheId" -- we will add another
field in struct cachedesc which describs the cache name.

Regards,
Qingqing




pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: ADD/DROP INHERITS
Next
From: Tom Lane
Date:
Subject: Re: code cleanup for SearchSysCache