pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikolay Shaplov <dhyan@nataraj.su>
To: pgsql-hackers@postgresql.org
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
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: Tue, 28 Mar 2017 18:58:37 +0300
Message-ID: <5867745.FjVmo6n3G8@x200m> (raw)
In-Reply-To: <20170317172126.o452q2cjds6o3pfx@alvherre.pgsql>
References: <20170317172126.o452q2cjds6o3pfx@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

В письме от 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.

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. 

So I think it wold be good to hide catalog function via *_pricate.h include 
file for these three indexes.

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?


-- 
Nikolay Shaplov, independent Perl & C/C++ developer. Available for hire.


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (46+ messages)  latest in thread

Message-ID: <5867745.FjVmo6n3G8@x200m>
Permalink:  ../5867745.FjVmo6n3G8@x200m/
Also on:    postgresql.org/message-id/5867745.FjVmo6n3G8@x200m

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: dhyan@nataraj.su, alvherre@2ndquadrant.com
  Subject: Re: [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM
  In-Reply-To: <5867745.FjVmo6n3G8@x200m>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox