Re: [HACKERS] SQLDA fix for ECPG

2011-12-03 Thread Michael Meskes
On Sat, Nov 19, 2011 at 10:56:03PM +0100, Boszormenyi Zoltan wrote: Hopefully last turn in this topic. For NUMERIC types, the safe minimum alignment is a pointer because there are 5 int members followed by two pointer members in this struct. I got a crash from this with a lucky query and

Re: [HACKERS] SQLDA fix for ECPG

2011-11-19 Thread Boszormenyi Zoltan
Hi, 2011-11-17 14:53 keltezéssel, Michael Meskes írta: On Mon, Nov 14, 2011 at 09:06:30AM +0100, Boszormenyi Zoltan wrote: Yes, you are right. For timestamp and interval, the safe alignment is int64. Patch is attached. Applied, thanks. Michael thanks. Hopefully last turn in this topic.

Re: [HACKERS] SQLDA fix for ECPG

2011-11-17 Thread Michael Meskes
On Mon, Nov 14, 2011 at 09:06:30AM +0100, Boszormenyi Zoltan wrote: Yes, you are right. For timestamp and interval, the safe alignment is int64. Patch is attached. Applied, thanks. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at

Re: [HACKERS] SQLDA fix for ECPG

2011-11-14 Thread Boszormenyi Zoltan
2011-11-13 17:27 keltezéssel, Tom Lane írta: Boszormenyi Zoltan z...@cybertec.at writes: I had a report about ECPG code crashing which involved a query using a date field. Attached is a one liner fix to make the date type's offset computed consistently across sqlda_common_total_size(),

Re: [HACKERS] SQLDA fix for ECPG

2011-11-13 Thread Michael Meskes
This must have been a cut and paste bug and is incorrect in 9.0.x, 9.1.x and GIT HEAD. It would be nice to have it applied before the next point releases come out. Applied, thanks for the patch. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)

Re: [HACKERS] SQLDA fix for ECPG

2011-11-13 Thread Tom Lane
Boszormenyi Zoltan z...@cybertec.at writes: I had a report about ECPG code crashing which involved a query using a date field. Attached is a one liner fix to make the date type's offset computed consistently across sqlda_common_total_size(), sqlda_compat_total_size() and