pgSqlDump dealing with timestamp exception thrown

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
TMelvin
Posts: 3
Joined: Fri 15 Mar 2013 19:57

pgSqlDump dealing with timestamp exception thrown

Post by TMelvin » Fri 15 Mar 2013 20:17

I've been experimenting with dotConnect for PostgreSQL's pqSqlDump class and came across a consistency of the class throwing exceptions for 33 of the 130 table. I made a list of the tables and looped through them to see which were throwing the exception of "A first chance exception of type 'System.InvalidCastException' occurred in Devart.Data.PostgreSql.dll".

I found the commonality of the field type that being a timestamp. It also failed with timestamp without time zone. So I created a table and retried to confirm the issue.

Code: Select all

CREATE TABLE bbb ( datetaken timestamp ) WITH ( OIDS=FALSE );
ALTER TABLE bbb OWNER TO xyz;
The code to reproduce the thrown exception is below with the exception thrown at the pgSqlDump.Backup call.

Code: Select all

foreach ( String tableName in tableList )
{
   using ( PgSqlDump pgSqlDump = new PgSqlDump( conn ))
   {
      pgSqlDump.Tables = tableName; 
      pgSqlDump.Backup();  //<=== exception thrown here
   }
}
The code generated into that SQLDumpbbb.dmp file gets truncated and looks like

Code: Select all

SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET default_tablespace = '';
SET default_with_oids = false;

CREATE TABLE public.bbb
(


Devart.Data.dll version 5.0.661.0
Devart.Data.Linq.dll version 4.1.207
Devart.Data.PostgreSql.dll version 6.5.202.0
Devart.Data.PostgreSql.Linq.dll version 4.1.207

Visual Studio 2010 SP1
PostgreSQL version 8.3.23 build 1400 on Windows 7

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: pgSqlDump dealing with timestamp exception thrown

Post by Pinturiccio » Mon 18 Mar 2013 14:07

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: pgSqlDump dealing with timestamp exception thrown

Post by Pinturiccio » Wed 27 Mar 2013 15:35

We have fixed the bug with InvalidCastException in PgSqlDump.Backup for PostgreSQL server 8.3 and earlier. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: pgSqlDump dealing with timestamp exception thrown

Post by Pinturiccio » Fri 05 Apr 2013 08:40

The new build of dotConnect for PostgreSQL 6.6.217 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=26317

Post Reply