Re: [HACKERS] ECPG patch causes warning

2010-01-13 Thread Boszormenyi Zoltan
Michael Meskes írta: On Sun, Jan 10, 2010 at 07:16:59PM +0100, Boszormenyi Zoltan wrote: As would ecpg_dynamic_type(), then. :-( My guess is that this function is fine when returning InvalidOid = 0. AFAICT it is supposed to fill an integer with the SQL3 type code which seems to

Re: [HACKERS] ECPG patch causes warning

2010-01-13 Thread Michael Meskes
On Wed, Jan 13, 2010 at 09:22:28AM +0100, Boszormenyi Zoltan wrote: I think it's best to assume a string. ecpg_set_{compat,native}_sqlda() uses the defailt case in that meaning anyway. Okay, applied as you send it. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot

Re: [HACKERS] ECPG patch causes warning

2010-01-12 Thread Michael Meskes
On Sun, Jan 10, 2010 at 07:16:59PM +0100, Boszormenyi Zoltan wrote: As would ecpg_dynamic_type(), then. :-( My guess is that this function is fine when returning InvalidOid = 0. AFAICT it is supposed to fill an integer with the SQL3 type code which seems to start with 1 too. So I will change

[HACKERS] ECPG patch causes warning

2010-01-10 Thread Magnus Hagander
Hi! 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. This

Re: [HACKERS] ECPG patch causes warning

2010-01-10 Thread Tom Lane
Magnus Hagander mag...@hagander.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

Re: [HACKERS] ECPG patch causes warning

2010-01-10 Thread Boszormenyi Zoltan
Tom Lane írta: Magnus Hagander mag...@hagander.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

Re: [HACKERS] ECPG patch causes warning

2010-01-10 Thread Tom Lane
Boszormenyi Zoltan z...@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

Re: [HACKERS] ECPG patch causes warning

2010-01-10 Thread Boszormenyi Zoltan
Tom Lane írta: Boszormenyi Zoltan z...@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