Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csuRo-0001ji-8P for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 16:58:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1csuRn-000450-Rc for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2017 16:58:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1csuRn-00044r-0s for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 16:58:19 +0000 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1csuRk-0001O6-7Q for pgsql-hackers@postgresql.org; Tue, 28 Mar 2017 16:58:18 +0000 Received: by mail-qk0-x22d.google.com with SMTP id f11so70872674qkb.0 for ; Tue, 28 Mar 2017 09:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=UE4/8GRv56Y7fvFTefA/0XrJ69tcgH2FzAlyzKkSnN0=; b=S4ENJlV0UQMvwbFfIJGr93PXIZjCr7rir7UzJJjAGmH4U2Nk7+2elXMVdMDf06A6AU iBBSWU2Vx4ZneZsvjl44F5bRMwtJPd2pkIZmerkGjRrTO0KNAZGPnG1tAFGZFnJFyzlN GGFazNd1A3lN4+g8iAZbTbDpdLto0OvIYq0eeBN1ZQfASsWG/C0ADcW3BFPVAwLC4jHj OYAFxsSww26jItDxfDAEZ8/Vg9elX50HiDuqZofPvfjnyDcyVXya7bqLe1hX2inh0xv3 XURF+Xp3xACsyJ4aUzTbyZ0tYcEZV0z1EZmz5E04aVQWQ9HIOuw9/FVfSNtmK+3TSC+4 9Cbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=UE4/8GRv56Y7fvFTefA/0XrJ69tcgH2FzAlyzKkSnN0=; b=o4BkyXRtR6vJ7r8JGFwxXBf6cl59Hn3OLJjtIFvk2GY16qZqA2BnXhFpyiUiBJVkjv IZwWvKXxVrlxsNZDipTqB0E+PxUdP/64UP/o6OwpmQ04MZHccw/ntUKL89dxIQCpEjiG UwjiJCc4CUzAmo+Y7IlvytAxMc0xS2I5MEaa9C4UIbmXRahdhBb6VgxwnLjw1SZWuL+n JszLyZ1nP/WQRsQ8WbJSFfXl6qRIJ8tJKa7a0QevZeVGof37JbdmUOpDd2Ps1CEgAGnO WkukyCezbkPoDiLPric/3ErA8gKfsNex2G46mTT0qHr4NRlib348w2aMQiA2EzF67QTq jBiw== X-Gm-Message-State: AFeK/H3+RkKHnsMrZyfHKN/RTdUckR8OdttTL8Xdv4JMZ0DfjRMLpz7u/ASusSjv9fWqEIeE X-Received: by 10.55.203.14 with SMTP id d14mr25304203qkj.0.1490720294302; Tue, 28 Mar 2017 09:58:14 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.115.10]) by smtp.gmail.com with ESMTPSA id j100sm3014965qkh.38.2017.03.28.09.58.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 09:58:13 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id ECB8C69; Tue, 28 Mar 2017 13:58:11 -0300 (CLST) Date: Tue, 28 Mar 2017 13:58:11 -0300 From: Alvaro Herrera To: Nikolay Shaplov Cc: pgsql-hackers@postgresql.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 Message-ID: <20170328165811.bxxzzh2nkaeqcb2a@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5867745.FjVmo6n3G8@x200m> User-Agent: NeoMutt/20170206-195-7adf12 (1.7.2) X-Pg-Spam-Score: -2.6 (--) 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 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers