Re: use of int4/int32 in C code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: use of int4/int32 in C code
Date: 2012-06-19 21:42:27
Message-ID: 22993.1340142147@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Jun 19, 2012 at 9:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I thought the general idea was to use int32 most places, but int4 in
>> catalog declarations. I don't think it's tremendously important if
>> somebody uses the other though.

> I concur with Peter that TMTOWTDI is not the right way to do this. I
> think we ought to get rid of int4 in code and use int32 everywhere.

I have not looked to see how many places do that. If it's a reasonably
small number of places, I'm OK with getting rid of int4 at the C level.
(int2/int8 the same of course.)

If we are going to do that, though, we need to actually remove those
typedefs. Leaving them around on the grounds that third-party code
might be using them will just allow cases to creep back in.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-06-19 21:46:56 Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node
Previous Message Robert Haas 2012-06-19 21:39:46 Re: Backport of fsync queue compaction