Page 1 of 1

Critical bug inserting PgSqlArray of doubles (data loss)

Posted: Tue 20 Apr 2010 15:01
by migle
Hi,

Surprinsing as it may seem, using the code bellow to insert a PgSqlArray of 10 doubles using PgSqlLoader, on my machine, actually results in 20 doubles being inserted.
If binary mode is used, however, the correct number of elements, 10, is inserted.

Hint: I live in continental Europe.

Code: Select all

object[] a = { 1e-1, 2e-1, 3e-2, 4e-2, 5e-2, 6e-2, 7e-2, 8e-2, 9e-2, 1e-1 };

PgSqlLoader loader = new PgSqlLoader("public.abc", conn);

loader.Columns.Add("arraycolumn", PgSqlType.Array, 0, 0, 0);
loader.Open();
loader.SetValue(0, new PgSqlArray(a, PgSqlType.Double, 1, a.Length));
loader.NextRow();
loader.Close();
This is at least the fifth trivially reproducible bug I found.
Cool, huh?
BTW, what happened to the beta version that was available before and is not longer there?

Miguel

Posted: Wed 21 Apr 2010 09:58
by StanislavK
Thank you for your report. We have reproduced the problem, and will inform you when it is fixed.

The Beta version included major changes implemented to support Entity Framework v4. It was available together with the stable 4.65.79 build. As we released the stable 4.90.120 build with the claimed changes, we removed the 4.65.79 build and Beta builds from downloads. At the moment, the 4.90.124 build of dotConnect for PostgreSQL is available:
http://www.devart.com/dotconnect/postgr ... nload.html
It supports Visual Studio 2010 and .NET Framework v4 RTM.

Posted: Fri 21 May 2010 16:45
by StanislavK
We have released the new 4.95.140 build of dotConnect for PostgreSQL. It can be downloaded from
http://www.devart.com/dotconnect/postgr ... nload.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

The new build contains fix for the bug on loading floats using PgSqlLoader in the text mode. For more information on fixes and improvements available in version 4.95.140, please see
http://www.devart.com/forums/viewtopic.php?t=18032