>>>>> "Mitchell" == Mitchell Smith <[EMAIL PROTECTED]> writes:

Mitchell> In my SOA records I am specifying the serial as 0, which according to 
the
Mitchell> documentation will cause PowerDNS to generate a serial for the domain 
based
Mitchell> on the changed_date of the records.

That doesn't work with the generic sql backend.

You have to do it in the sql.

I'd use a view rather than a table for records.  Have it grab the values
from one or more backend tables for everything other than SOA RRs, and
create SOA RR rows from the data in the domains table (which should be
extended to include everything in an SOA other than serial) and the
largest changed_date column from that domain's RRs.

Something akin to:

 SELECT rr.content, rr.ttl, rr.prio, rr."type", rr.domain_id, rr.name
   FROM rr
  WHERE rr."type"::text <> 'SOA'::text
UNION 
 SELECT domains.soa_host || ' '::text || domains.soa_email || ' '::text ||
        domains.serial AS content, domains.default_ttl AS ttl,
        NULL AS prio, 'SOA' AS "type", domains.id AS domain_id, domains.name
   FROM domains;

(which I grabbed from some old notes; obviously domains.serial needs to
be replaced with GREATEST and a join).

-JimC
-- 
James Cloos <[EMAIL PROTECTED]>         OpenPGP: 1024D/ED7DAEA6
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to