Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boiQu-0000ls-Ty for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2016 02:47:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1boiQu-0000uJ-8s for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2016 02:47:48 +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 1boiPX-0007Y3-5j for pgsql-hackers@postgresql.org; Tue, 27 Sep 2016 02:46:23 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1boiP3-0005oH-Nv for pgsql-hackers@postgresql.org; Tue, 27 Sep 2016 02:46:22 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 2903E208AB; Mon, 26 Sep 2016 22:45:52 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Mon, 26 Sep 2016 22:45:52 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=jRZkXWbSzk8FNkH bO3ZMjIDWo48=; b=loXnRaY92fngiW/VxeYUKmSGs6ag/cLQUQyGtyvh92U7ZBq oOarSMOTwaeVYpoHQmHbSSE1ttNugubdhBg/wpOmDGAtafceviXXpYRocuVHiRbR p6z/LR7mwRt/Tor0+vzRwkpbeVCTZsNgqJ6prp1xLqeQrdX5722OhxwQrGvg= X-Sasl-enc: V81i96io2YppioatYRS6+z+3mBSRgGo3su0w2jntBAn/ 1474944351 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 2CB34CCEB2; Mon, 26 Sep 2016 22:45:51 -0400 (EDT) Subject: Re: pageinspect: Hash index support To: Jesper Pedersen References: <20160830170633.GA508711@alvherre.pgsql> <0f99b6b0-0e54-0f6e-9502-f8cb6f194c17@redhat.com> <3493caf5-6d50-8915-7612-bd830972f513@redhat.com> <5d64a536-cc90-ce96-b68f-5b6bd3206476@redhat.com> <80a00b5c-56d3-dffb-8dba-edf5d2167b12@2ndquadrant.com> <16d89e7e-cb1a-cb5d-e944-6f10c324a312@redhat.com> Cc: Michael Paquier , Ashutosh Sharma , Jeff Janes , Alvaro Herrera , PostgreSQL Hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 26 Sep 2016 22:45:50 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <16d89e7e-cb1a-cb5d-e944-6f10c324a312@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 On 9/26/16 1:39 PM, Jesper Pedersen wrote: > Left as is, since BuildTupleFromCStrings() vs. xyzGetDatum() are equally > readable in this case. But, I can change the patch if needed. The point is that to use BuildTupleFromCStrings() you need to convert numbers to strings, and then they are converted back. This is not a typical way to write row-returning functions. >> - hash_metap result fields spares and mapp should be arrays of integer. > > B-tree and BRIN uses a 'text' field as output, so left as is. These fields are specific to hash, so the precedent doesn't necessarily apply. >> - The data field could be of type bytea. > > Left as is, for same reasons as 'spares' and 'mapp'. Comments from others here? Why not use bytea instead of text? -- Peter Eisentraut http://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