Skip site navigation (1) Skip section navigation (2)

Re: Macros for typtype (was Re: Arrays of Complex Types)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>, David Fetter <david(at)fetter(dot)org>
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)
Date: 2007-04-01 08:15:29
Message-ID: 200704011015.30442.peter_e@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> What bothers me about that is I don't think the C spec mandates the
> representation width.  If we could guarantee that enum typtype_type
> was 1 byte I'd be all for it.

The width is 4 both for the macro and the enum case.  Both

#define TYPTYPE_BASE 'b'

and

enum ... {
	TYPTYPE_BASE = 'b',

effectively generate int constants named TYPTYPE_BASE with decimal value 
98.  So there are no storage advantages either way.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

pgsql-hackers by date

Next:From: Gregory StarkDate: 2007-04-01 09:36:39
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)
Previous:From: Tom LaneDate: 2007-04-01 07:50:07
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)

pgsql-patches by date

Next:From: Gregory StarkDate: 2007-04-01 09:36:39
Subject: Re: Macros for typtype (was Re: Arrays of Complex Types)
Previous:From: Greg SmithDate: 2007-04-01 07:57:35
Subject: Re: bgwriter stats

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group