From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Nikolay Shaplov <dhyan(at)nataraj(dot)su> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM |
Date: | 2017-03-28 16:58:11 |
Message-ID: | 20170328165811.bxxzzh2nkaeqcb2a@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Nikolay Shaplov wrote:
> В письме от 17 марта 2017 14:21:26 пользователь Alvaro Herrera написал:
>
> > Please make sure to mark functions as static (e.g. bringetreloptcatalog).
> I am a bit confused here:
>
> For brin and nbtree this is a good idea: brin.c and nbtree.c has AM-handler
> inside it, and there are other static functions there. Adding one more static
> function here seems to be quite logical.
I am just saying that if there is a function used only in one
compilation unit (.c file) then let's make sure its prototype says
"static".
> For gin, gist and spgist, authors seems to use [index_name]_private.h files to
> hide internal functions from outside code. In ginutil.c and spgutils.c, where
> AM-handler is located, there is no static functions at all... gist.c has, but
> I think I should write similar code for all *_private.h indexes.
Sure.
> hash.c is quite a mess...
> There is no hash_private.h, AM-handles is located in hash.c, that has "This
> file contains only the public interface routines." comment at the beginning,
> and there is no static functions inside. I do not know what is the right way
> to hide hashgetreloptcatalog function here...
>
> What would you advise?
Leave it where it is (hashutil.c), no static marker. We may want to
move things around later, but that's not your patch's responsibility.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Pavan Deolasee | 2017-03-28 17:01:47 | Re: Patch: Write Amplification Reduction Method (WARM) |
Previous Message | Robert Haas | 2017-03-28 16:55:36 | Re: Monitoring roles patch |