| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Magnus Hagander <magnus(at)hagander(dot)net> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org> |
| Subject: | Re: ECPG patch causes warning |
| Date: | 2010-01-10 16:15:38 |
| Message-ID: | 4415.1263140138@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> The ecpg patch at
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=2f567552
> causes a compile warning on win64 (andi think win32, but I didn't
> recheck that). Specifically, line 140 of typename.c has:
> return (-type);
> Where type is of type Oid, which is unsigned.
I think that the compiler has caught an actual mistake here.
It looks to me like the patch is attempting to use a 'negative'
Oid to signal a problem, and that simply is going to break as soon
as the Oid counter runs past 2G. Perhaps InvalidOid is the thing
to use here? I did not look at the call sites though.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Boszormenyi Zoltan | 2010-01-10 16:35:41 | Re: ECPG patch causes warning |
| Previous Message | Simon Riggs | 2010-01-10 15:49:00 | Re: Small Bug in GetConflictingVirtualXIDs |