I'm using Slony 2.2.0b1 (tarball) with PostgreSQL 9.2. iservices is the database ipostoffice is the schema postoffices is the table potype_t is the domain/type and it's defined in the ipostoffice schema The slony user does not have ipostoffice in its search_path. When replication is attempted the following hits PostgreSQL: [slony@iservices] ERROR: 42704: type "potype_t" does not exist at character 104 [slony@iservices] QUERY: INSERT INTO "ipostoffice"."postoffices" ("id", "postoffice", "potype") VALUES ($1::int4, $2::text, $3::potype_t); [slony@iservices] CONTEXT: COPY sl_log_1, line 1: "1 50213 23001 1 ipostoffice postoffices I 0 {id,2,postoffice,w.x.y.z,potype,hosted}" [slony@iservices] LOCATION: typenameType, parse_type.c:204 Problem here is that $3::potype_t /really/ needs to be $3::ipostoffice.potype_t. The following, though, work: insert into postoffices (id,postoffice,potype) values (3,'w.x.y.z','hosted'); works where the user has the schema in their path insert into ipostoffice.postoffices (id,postoffice,potype) values (4,'w.x.y.zz','hosted'); where the user does not insert into ipostoffice.postoffices (id,postoffice,potype) values (5,'w.x.y.zzz','hosted'); works as the slony user (which does not) This setup works fine with 2.0.3rc3 and PostgreSQL 8.3.
Proposed fix by handling the cast inside of the apply trigger the same way, PL/pgSQL is doing type casting internally. https://github.com/wieck/slony1-engine/commit/47c6f3876a66c4f461ff044080db37e124401847
(In reply to comment #1) > https://github.com/wieck/slony1-engine/commit/47c6f3876a66c4f461ff044080db37e124401847 Ok. I may be being dumb but... how do I download that as a patch? :)
Created attachment 156 [details] Jan's patch Attach is the patch that Jan posted on github
Committed to master http://git.postgresql.org/gitweb/?p=slony1-engine.git;a=commit;h=35d02edcaf494f4940a77dc5710f5078c1abd21d