From: Leszek Jakubowski Date: Wed, 11 Mar 2015 15:43:03 +0000 (+0100) Subject: Fixed outdated docs X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~98^2~48^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f88ceda82d4bc3fef54a596cb2a9f63d86ad15fc;p=pdns Fixed outdated docs default sql queries have a wrong number and order of columns --- diff --git a/docs/markdown/authoritative/backend-generic-mypgsql.md b/docs/markdown/authoritative/backend-generic-mypgsql.md index 03728f264..c0d4668b5 100644 --- a/docs/markdown/authoritative/backend-generic-mypgsql.md +++ b/docs/markdown/authoritative/backend-generic-mypgsql.md @@ -111,21 +111,21 @@ As said earlier, there are 8 SQL queries for regular lookups. To configure them, # Queries and settings ## Regular Queries ### `basic-query` -Default: `select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s'` This is the most used query, needed for doing 1:1 lookups of qtype/name values. First %s is replaced by the ASCII representation of the qtype of the question, the second by the name. +Default: `select content,ttl,prio,type,domain_id,disabled,name,auth from records where type='%s' and name='%s'` This is the most used query, needed for doing 1:1 lookups of qtype/name values. First %s is replaced by the ASCII representation of the qtype of the question, the second by the name. ### id-query -Default: `select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s' and domain_id=%d` Used for doing lookups within a domain. First %s is replaced by the qtype, the %d which should appear after the %s by the numeric domain\_id. +Default: `select content,ttl,prio,type,domain_id,disabled,name,auth from records where type='%s' and name='%s' and domain_id=%d` Used for doing lookups within a domain. First %s is replaced by the qtype, the %d which should appear after the %s by the numeric domain\_id. ### any-query -For doing ANY queries. Also used internally. Default: `select content,ttl,prio,type,domain_id,name from records where name='%s'` The %s is replaced by the qname of the question. +For doing ANY queries. Also used internally. Default: `select content,ttl,prio,type,domain_id,disabled,name,auth from records where name='%s'` The %s is replaced by the qname of the question. ### any-id-query -For doing ANY queries within a domain. Also used internally. Default: `select content,ttl,prio,type,domain_id,name from records where name='%s' and domain_id=%d` The %s is replaced by the name of the domain, the %d by the numerical domain id. +For doing ANY queries within a domain. Also used internally. Default: `select content,ttl,prio,type,domain_id,disabled,name,auth from records where name='%s' and domain_id=%d` The %s is replaced by the name of the domain, the %d by the numerical domain id. The last query is for listing the entire contents of a zone. This is needed when performing a zone transfer, but sometimes also internally: ### list-query -To list an entire zone. Default: `select content,ttl,prio,type,domain_id,name from records where (disabled=0 OR %d) AND domain_id=%d` The first %d is replaced by the "include disabled" flag (default 0), the second %d is replaced by the domain_id. +To list an entire zone. Default: `select content,ttl,prio,type,domain_id,disabled,name,auth from records where (disabled=0 OR %d) AND domain_id=%d` The first %d is replaced by the "include disabled" flag (default 0), the second %d is replaced by the domain_id. ## DNSSEC queries If DNSSEC is enabled (through the `-dnssec` flag on a gsql backend), many queries are replaced by slightly extended variants that also query the auth column. The auth column is always added as the rightmost column. These are the -auth defaults: @@ -245,7 +245,7 @@ For doing wildcard ANY queries within a domain. Default: `select content,ttl,pri The queries above are specified in pdns.conf. For example, the basic-query would appear as: ``` -gpgsql-basic-query=select content,ttl,prio,type,domain_id,name from records where type='%s' and name='%s' +gpgsql-basic-query=select content,ttl,prio,type,domain_id,disabled,name,auth from records where type='%s' and name='%s' ``` When using the Generic PostgreSQL backend, they appear as above. When using the generic MySQL backend, change the "gpgsql-" prefix to "gmysql-".