PgSqlRowType: GetRowType() problem

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
che1972
Posts: 8
Joined: Thu 04 Sep 2014 12:02

PgSqlRowType: GetRowType() problem

Post by che1972 » Tue 21 Oct 2014 10:17

I am using driver version 7.3.225.
I use the static method GetRowType(typeName, connection) of class PgSqlRowType.
I work with two databases which should have the same structure, but different data.
In both databases there is a class with a composite type field in it (and a few fields more).
On one database I get the correct return value, but on the other database I always get "null" as the result.
I compared both cases but didn't see any differences. Unfortunately I couldn't find further documentation for this method. And an exception wasn't thrown as well.
Does anybody know in which case(s) GetRowType(...) returns null?
Thank you.

che1972
Posts: 8
Joined: Thu 04 Sep 2014 12:02

Re: PgSqlRowType: GetRowType() problem

Post by che1972 » Wed 22 Oct 2014 11:12

Hello again,
I examined this problem a little bit further.
I use the "SQL Manager for PostgreSQL" from EMS for the work with the database. I looked at the system tables and wondered that all oids are always 0 (default_with_oids is ON). But obviously SQL Manager cannot display numbers above 2^31. When I look at the database on the psql console, then the oids are displayed correctly.
Does GetRowType() maybe have problems with large oids? I can't really imagine that because the method should work properly even when the database doesn't use oids. I ask because it is not easy to solve this problem.
Thank you.

che1972
Posts: 8
Joined: Thu 04 Sep 2014 12:02

Re: PgSqlRowType: GetRowType() problem

Post by che1972 » Thu 23 Oct 2014 11:51

Hello,
I have more information, maybe helpful for finding a solution.

My original code (which doesn't work with one of the databases):
PgSqlRowType pgRowType = PgSqlRowType.GetRowType(dbCompositeTypeName, conn);

Now I tried this:
PgSqlRow pgr = new PgSqlRow(dbCompositeTypeName, conn);

There is no problem with the working database, but the other one (where GetRowType() returns null) throws an ArgumentException. Unfortunately I don't get more useful information from this exception.

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

Re: PgSqlRowType: GetRowType() problem

Post by Pinturiccio » Thu 23 Oct 2014 13:27

We are investigating the issue and will notify you about the results as soon as possible.

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

Re: PgSqlRowType: GetRowType() problem

Post by Pinturiccio » Wed 29 Oct 2014 15:20

We have made some changes in dotConnect for PostgreSQL that should fix the issue. Please send us your license number so that we could send you the internal build with the changes.

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

Re: PgSqlRowType: GetRowType() problem

Post by Pinturiccio » Thu 06 Nov 2014 14:31

We have fixed the bug with returning NULL by PgSqlRowType.GetRowType method for types with large OID.

New build of dotConnect for PostgreSQL 7.3.283 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=30712

Post Reply