Re: [PATCH] Move 'long long' check to c.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Move 'long long' check to c.h
Date: 2010-05-24 17:12:21
Message-ID: 10589.1274721141@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes <meskes(at)postgresql(dot)org> writes:
> On Sat, May 22, 2010 at 11:20:50PM -0400, Stephen Frost wrote:
>> git diff -p), I noted that c.h is already included by both extern.h
>> and ecpg.header through postgres_fe.h. Given this and that we're
>> already doing alot of similar #define's there (unlike in those other
>> files), I felt c.h was a more appropriate place. Putting it in c.h
>> also means we don't have to duplicate that code.

> But do other parts of PG also need it? Keep in mind that this works for ecpg
> because it needs LLONG_MIN or LONGLONG_MIN anyway. I'm not sure if there are
> compilers that have long long without those defines, but I'd guess there
> aren't.

I think the current coding is extremely fragile (if it indeed works at
all) because of its assumption that <limits.h> has been included
already. In any case, we have configure tests that exist only for the
benefit of contrib modules, so it's hard to argue that we shouldn't have
one that exists only for ecpg.

I think we should fix this (properly) for 9.0.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-05-24 17:43:02 Re: pg_upgrade docs
Previous Message Heikki Linnakangas 2010-05-24 17:11:16 Re: Exposing the Xact commit order to the user