Re: use of int4/int32 in C code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "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 22:01:55
Message-ID: 24568.1340143315@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 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.)

> $ find -name '*.h' -or -name '*.c' | egrep -v '/tmp_check/' | xargs cat
> | egrep -c '\bint4\b'
> 570

That one looks like a lot, but a quick eyeball check suggests that many
of them are in comments and/or embedded SQL fragments where they
actually represent references to the SQL datatype, and so should be
left alone. The impression I get is that the actual typedef uses are
concentrated in a couple of contrib modules and some of the tsearch
stuff, where they'd probably not be that painful to fix.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-06-19 22:02:06 Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node
Previous Message Andres Freund 2012-06-19 22:01:05 Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node