pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: BRIN page type identifier
Date: Mon, 09 Mar 2015 23:39:11 -0400
Message-ID: <14066.1425958751@sss.pgh.pa.us> (raw)
In-Reply-To: <8620.1425944081@sss.pgh.pa.us>
References: <546A16EF.9070005@vmware.com>
	<20150309223505.GT3291@alvh.no-ip.org>
	<8620.1425944081@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

I wrote:
> You could try something like
> typedef struct BrinSpecialSpace
> {
> 	uint16		vector[MAXALIGN(1) / sizeof(uint16)];
> } BrinSpecialSpace;
> and then some access macros to use the last and next-to-last
> elements of that array.

On second thought, consider

typedef struct BrinSpecialSpace
{
	uint16		flags;
	uint16		vector[MAXALIGN(1) / sizeof(uint16) - 1];
} BrinSpecialSpace;

This way, accesses to "flags" require no source code changes.
You still need a macro to map "type" onto the last element of
the vector, but there's probably about one reference to "type"
in the source code so it shouldn't be too painful.

			regards, tom lane


-- 
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 (6+ messages)  latest in thread

Message-ID: <14066.1425958751@sss.pgh.pa.us>
Permalink:  ../14066.1425958751@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14066.1425958751@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, hlinnaka@iki.fi
  Subject: Re: BRIN page type identifier
  In-Reply-To: <14066.1425958751@sss.pgh.pa.us>

* 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