[Bucardo-general] 'type "int_unsigned" does not exist' error when creating sync

Bill McGonigle bill at bfccomputing.com
Thu Jul 29 22:25:17 UTC 2010


Thanks for the fast response, Greg!

On 07/28/2010 10:34 PM, Greg Sabino Mullane wrote:

> Nope, that's right. To be specific, Postgres doesn't know about the
> 'int_unsigned' data type because there isn't one. These are drupal-specific
> domains that look like this:
>
> "CREATE DOMAIN int_unsigned integer CHECK (VALUE>= 0)"

Ah, OK, I understand DOMAIN's now.

> The best fix is to change the schema to use constraints rather
> than a domain. See the patch at comment #27 here for example:
>
> http://drupal.org/node/339588

No argument this is the right fix.  It looks like it's in Drupal HEAD 
now, so hopefully the next release does the right thing by default.

> The other way would be to patch Bucardo and tell it that int_unsigned
> is really "int", smallint_unsigned is really smallint, and bigint_unsigned
> is really bigint. That should be safe enough to do, as I can't imagine
> many other people are creating such types outside of drupal.

This seems like the easiest way to get things going for an existing 
install.  I'd be happy to give it a shot - could you point me to the 
right section of code to look at?  The only specific instance of 'int' 
looks to be at:

   if ($g->{pkeytype}[0] =~ /int$/o) {

in two locations.  I certainly don't fully understand the code base yet!

Thanks,
-Bill

-- 
Bill McGonigle, Owner
BFC Computing, LLC
http://bfccomputing.com/
Telephone: +1.603.448.4440
Email, IM, VOIP: bill at bfccomputing.com
VCard: http://bfccomputing.com/vcard/bill.vcf
Social networks: bill_mcgonigle/bill.mcgonigle


More information about the Bucardo-general mailing list