From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Ryan Kirkpatrick <pgsql(at)rkirkpat(dot)net>, pgsql-hackers(at)postgresql(dot)org, pgsql-ports(at)postgresql(dot)org |
Subject: | Re: PostgreSQL pre-7.1 Linux/Alpha Status... |
Date: | 2000-12-21 17:56:35 |
Message-ID: | 18463.977421395@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-ports |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> if (sizeof(unsigned long) > sizeof(Oid) && cvt > UINT_MAX)
Hm. Each part of that will generate "expression is always false"
warnings from certain overprotective compilers. A more serious problem
is that using UINT_MAX assumes that Oid is unsigned int, which will
certainly not be true forever --- but the required change will be easily
missed when Oid changes.
Perhaps postgres_ext.h could define
#define OID_MAX UINT_MAX
right below the typedef for Oid, and then we could do this in oidin():
#if OID_MAX < ULONG_MAX
if (cvt > OID_MAX)
elog();
#endif
I think this #if expression will work --- anyone see any portability
risk there?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-12-21 18:09:38 | Re: Re: equal operator for _int4 (array of int4) |
Previous Message | Rod Taylor | 2000-12-21 17:33:10 | Inline Comments for pg_dump |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-12-21 18:41:41 | Re: [HACKERS] PostgreSQL pre-7.1 Linux/Alpha Status... |
Previous Message | Peter Eisentraut | 2000-12-21 17:29:20 | Re: [HACKERS] PostgreSQL pre-7.1 Linux/Alpha Status... |