LinqConnect Model not supporting custom PostgreSQL data types (domains)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
claflamme
Posts: 1
Joined: Wed 01 Jun 2016 18:50

LinqConnect Model not supporting custom PostgreSQL data types (domains)

Post by claflamme » Wed 01 Jun 2016 19:03

We are using a custom field data type to store email addresses defined like this in PostgreSQL:

CREATE DOMAIN schema1."d_Email"
AS character varying(50)
COLLATE pg_catalog."default"
CONSTRAINT "d_Email_check" CHECK (rubixprocessing."f_IsValidEmail"(VALUE::text) = true);
ALTER DOMAIN schema1."d_Email"

When using linqConnect and adding a table using this data type to the model, we get the following error:

The ServerDataType value of the Column element 'Email' in the Type element 'Person' is not valid. The data type 'D_EMAIL' is not supported.

We are testing linqConnect for the first time to see if we could use it in our projects. We are blocked on this issue.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: LinqConnect Model not supporting custom PostgreSQL data types (domains)

Post by Shalex » Fri 03 Jun 2016 14:59

LinqConnect works with a specific set of primitive data types only: https://www.devart.com/linqconnect/docs ... pping.html. User defined types are not supported.

As a workarond, please work with domains via plain ADO.NET classes (PgSqlConnection / PgSqlCommand / etc).

Post Reply