Re: pageinspect: Hash index support

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Ashutosh Sharma <ashu.coek88@gmail.com>, Jeff Janes <jeff.janes@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-09-27T02:45:50Z
Lists: pgsql-hackers
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


Commits

  1. Fix incorrect typecast.

  2. In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines.

  3. pageinspect: Support hash indexes.

  4. Add uuid to the set of types supported by contrib/btree_gist.

  5. Allow CREATE EXTENSION to follow extension update paths.