Dan Carleton DanC
Mon Aug 16 18:34:06 PDT 2004
Hello,

I'm running Slony-I 1.0.1 on PostgreSQL 7.3.2, which does not appear to
support namespace pathing in CREATE CAST statements.  The stock
xxid.v73.sql was failing with syntax errors on the casting to make xid
and xxid interchangeable.  I got around this by putting @NAMESPACE@ in
search_path, and this seems to work fine, though I can't test well
because I don't know how to make an xid. =)

*** src/xxid/xxid.v73.sql	Tue Jun 15 16:27:18 2004
--- /usr/local/postgresql-7.3.2/share/xxid.v73.sql	Mon Aug 16 11:02:08
2004
***************
*** 37,47 ****
  -- Since our xxid type has special cases for values 0-3, it
  -- in fact IS xid, so allow implicit type casting to and from.
  --
! CREATE CAST (xid AS @NAMESPACE at .xxid)
  	WITHOUT FUNCTION AS IMPLICIT;
! CREATE CAST (@NAMESPACE at .xxid AS xid)
  	WITHOUT FUNCTION AS IMPLICIT;
  
  
  --
  -- Comparision functions for the new datatype
--- 37,57 ----
  -- Since our xxid type has special cases for values 0-3, it
  -- in fact IS xid, so allow implicit type casting to and from.
  --
! 
! --
! -- PostgreSQL 7.3.2 doesn't appear to support namespace pathing
! -- in CREATE CAST, but including our namespace in the search path 
! -- seems to work.
! --
! 
! SET search_path TO public, at NAMESPACE@;
! 
! CREATE CAST (xid AS xxid)
  	WITHOUT FUNCTION AS IMPLICIT;
! CREATE CAST (xxid AS xid)
  	WITHOUT FUNCTION AS IMPLICIT;
  
+ SET search_path TO public;
  
  --
  -- Comparision functions for the new datatype

Thanks,

-- 
Dan Carleton
Open Source Technology Engineer
HouseValues, Inc.
(425) 732-4153


More information about the Slony1-general mailing list