Re: ECPG patch causes warning
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Boszormenyi Zoltan <zb@cybertec.at>
Cc: Magnus Hagander <magnus@hagander.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Michael Meskes <meskes@postgresql.org>
Date: 2010-01-10T16:47:59Z
Lists: pgsql-hackers
Boszormenyi Zoltan <zb@cybertec.at> writes: > Tom Lane rta: >> I think that the compiler has caught an actual mistake here. > Yes, it's a mistake, but not an actual bug. > The intent was to be able to catch unhandled > cases in the application, just as in ecpg_dynamic_type(). > The fix for sqlda_dynamic_type() is to use the same cast: > return -(int) type; > Should I send a patch for this? You should send a patch to *get rid of it*. Putting in a cast only hides the fact that this logic will break on OIDs above 2G. regards, tom lane