Critical bug inserting PgSqlArray of doubles (data loss)

Critical bug inserting PgSqlArray of doubles (data loss)

Postby migle » Tue 20 Apr 2010 15:01

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
migle
 
Posts: 27
Joined: Tue 19 Jan 2010 13:52

Postby StanislavK » Wed 21 Apr 2010 09:58

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/postgresql/download.html
It supports Visual Studio 2010 and .NET Framework v4 RTM.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Fri 21 May 2010 16:45

We have released the new 4.95.140 build of dotConnect for PostgreSQL. It can be downloaded from
http://www.devart.com/dotconnect/postgresql/download.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
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for PostgreSQL