Re: SQLDA fix for ECPG

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: SQLDA fix for ECPG
Date: 2011-11-14 08:06:30
Message-ID: 4EC0CC06.30506@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011-11-13 17:27 keltezéssel, Tom Lane írta:
> Boszormenyi Zoltan <zb(at)cybertec(dot)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
>> sqlda_native_total_size().
> Is this really the only issue there? I notice discrepancies among those
> three routines for some other types too, notably ECPGt_timestamp and
> ECPGt_interval.
>
> regards, tom lane

Yes, you are right. For timestamp and interval, the safe alignment is int64.
Patch is attached.

Best regards,
Zoltán Böszörményi

--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
http://www.postgresql.at/

Attachment Content-Type Size
ecpg-sqlda-part2.patch text/plain 1.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-11-14 09:08:29 Re: Core Extensions relocation
Previous Message Jeff Davis 2011-11-14 07:32:18 Re: Cause of intermittent rangetypes regression test failures