Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cstWe-000738-Ac for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 15:59:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cstWd-0003d8-Tm for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 15:59:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cstWc-0003cy-V0 for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 15:59:15 +0000 Received: from enot.nataraj.su ([195.54.209.170]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cstWa-0002Gf-1Z for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 15:59:13 +0000 Received: from x200m.localnet (unknown [188.187.8.18]) by enot.nataraj.su (Postfix) with ESMTPSA id 552F2511E274; Tue, 28 Mar 2017 11:58:39 -0400 (EDT) From: Nikolay Shaplov To: pgsql-hackers@postgresql.org Cc: Alvaro Herrera 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> User-Agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) In-Reply-To: <20170317172126.o452q2cjds6o3pfx@alvherre.pgsql> References: <20170317172126.o452q2cjds6o3pfx@alvherre.pgsql> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org =D0=92 =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 =D0=BE=D1=82 17 =D0=BC=D0=B0=D1= =80=D1=82=D0=B0 2017 14:21:26 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0= =B0=D1=82=D0=B5=D0=BB=D1=8C Alvaro Herrera =D0=BD=D0=B0=D0=BF=D0=B8=D1=81= =D0=B0=D0=BB: > 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= =20 inside it, and there are other static functions there. Adding one more sta= tic=20 function here seems to be quite logical. For gin, gist and spgist, authors seems to use [index_name]_private.h files= to=20 hide internal functions from outside code. In ginutil.c and spgutils.c, whe= re=20 AM-handler is located, there is no static functions at all... gist.c has, = but=20 I think I should write similar code for all *_private.h indexes.=20 So I think it wold be good to hide catalog function via *_pricate.h include= =20 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= =20 file contains only the public interface routines." comment at the beginning= ,=20 and there is no static functions inside. I do not know what is the right wa= y=20 to hide hashgetreloptcatalog function here... What would you advise? --=20 Nikolay Shaplov, independent Perl & C/C++ developer. Available for hire. --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers