Page 1 of 1

Postgres Domains don't work

Posted: 19.12.2005, 22:46
by btrewern
I have an application which uses Postgresql 8.0.3 as the backend. I have been using ZeosDbo 6.1.5 but thought I'd try install '6.5.1 alpha CVS as of 13/10/2005' version of ZeosLib.

Now when I try to connect one of the datasets I get 'Type mismatch for field 'location', expecting: String actual: Unknown.

The location field is defined as follows:

CREATE DOMAIN short_text_dom
AS varchar(250);

ALTER TABLE job_list ADD COLUMN "location" short_text_dom;

I'm assuming this problem is to do with the domain. Does anyone know what the problem is? It used to work without problems in 6.1.5.

Regards,

Ben.

Posted: 20.12.2005, 00:53
by btrewern
I've been looking through the code and it seems that I can get my head round it. I'll look at creating a patch for this in the next couple of days (When I get the time).

Ben

Posted: 20.12.2005, 01:07
by btrewern
Attached is (hopefully) a fix based on 6.1.5 code. See the GetTypeNameByOid function. I've made some small changes so that Domain types are recognised.

Regards,

Ben