[Pdns-users] [pdns-mysql] a domain_id of type varchar

Moreno Gentili brightsoul at tiscali.it
Tue Oct 2 15:36:07 UTC 2012


Hi everyone, I'm using PowerDNS on a MySql backend.
All worked fine until I decided to create a slightly modified version of 
the mysql database schema 
<http://doc.powerdns.com/generic-mypgsql-backends.html#idp8855424>
In particular, I changed the 'domain_id' field from the 'records' table 
to be of type *varchar*, since I want to use the domain name itself as 
the foreign key and not some autoincremental numeric value. Postfix, for 
instance, uses this approach.

The problem is that PowerDns tries to cast the 'domain_id' value to 
integer and, failing in doing so, the resulting value is always a 0. 
That's my interpretation, since I've seen a '0' showing up in subsequent 
mysql queries.

Any hints on how I might solve this problem without actually 
reintroducing the numeric field?
Thank you in advance!
<http://doc.powerdns.com/generic-mypgsql-backends.html#idp8855424>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20121002/741d4cf6/attachment.html>


More information about the Pdns-users mailing list