[Pdns-users] Edit Queries gmysql

Shawn Augenstein shawnsrabbithole at gmail.com
Mon Sep 9 21:21:34 UTC 2019


That does clear up a couple of points, I appreciate it! What I am trying to
do is limit the response of records via the query so I need to edit the
query itself. In essence I'm doing DNS Round-robin but limiting the
responses. If I have a record with 100 IPs associated, when the db is
queried I only want to return "X" (lets say 3) of the possible 100
returned.  Conversely, I can write the query and call it out ...it's just
the where to do it (for both cases) that's alluding me.

-S

On Mon, Sep 9, 2019 at 12:33 PM Brian Candler <b.candler at pobox.com> wrote:

> On 09/09/2019 16:30, Shawn Augenstein wrote:
>
> ##################################
> #gmysql-launchname-queryname   Override the default queries with custom
> parameters
>
> gmysql-launchname-queryname=SELECT
> content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE
> disabled=0 and type=? and name=? LIMIT 5 OFFSET 5
>
>
> Using the Basic Query as my template
> #################################
> # gmysql-basic-query Basic query
> #
> # gmysql-basic-query=SELECT
> content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE
> disabled=0 and type=? and name=?
>
> The only reference I can find to gmysql-launchname-queryname is here:
> https://github.com/PowerDNS/pdns/wiki/gmysql-gpgsql-FAQ
>
> I'm not an expert in this area, but I don't think there's any option with
> that name: I think it means
>
>     <gmysql-launchname>-<queryname>
>
> That is, if you've specified --launch=gmysql when you start pdns (or
> "launch+=gmysql" in pdns.conf), and you want to set the basic-query, then
> the setting is "gmysql-basic-query"
>
> There's a more explicit example in the main documentation:
>
> https://doc.powerdns.com/authoritative/backends/generic-sql.html
>
> which shows:
>
> gmysql-basic-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type=? and name=?
>
> Does that help?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20190909/f8fa05e3/attachment.htm>


More information about the Pdns-users mailing list