[Pdns-users] Active records and Disabled Records

Wolfgang Faust wolfgangmcq at gmail.com
Mon Jun 2 16:49:23 UTC 2014


On Jun 2, 2014 12:00 PM, "Matt ." <yamakasi.014 at gmail.com> wrote:
>
> Hi all.
>
> Is it possible in PDNS to have active and inactive records ?
>
> What I mean with Inactive is that they are set to 0 or whatever and
> PDNS ignores them on a SQL qeury when a lookup is done.
>
> Thanks!
>
> Matt

I think the easiest way to do that is to put another column (say,
`enabled TINYINT(1)') and then define custom queries like so:
    gmysql-basic-query=select content,ttl,prio,type,domain_id,name
from records where type='%s' and name='%s' and enabled=1
    gmysql-id-query=select content,ttl,prio,type,domain_id,name from
records where type='%s' and name='%s' and domain_id=%d and enabled=1
and so on. See the backend docs for details:
http://downloads.powerdns.com/documentation/html/generic-mypgsql-backends.html#idp61796144




More information about the Pdns-users mailing list