[Pdns-users] Import of slave zone with PostgreSQL not case insensitive

Volker Goetz goetz at sectionone.de
Mon Apr 14 20:11:18 UTC 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I've tried to set up PowerDNS 2.9.7 as slave dns server with PostgreSQL 
backend. Everything runs fine and out of the box when following the steps 
in the manual. With one big exception: The data imported from zone 
transfers is not stored with names converted to lower case characters:

a record of 

11.22.33.44.IN-ADDR.ARPA.  IN PTR foo.bar.com.

is stored in the PostgreSQL database "as is". Incoming queries are first 
converted to lower case before the database query. So some kinde of

SELECT .... WHERE name = '11.22.33.44.IN-ADDR.ARPA"

yields no result set (string comparison in PostgreSQL with operator = is 
case sensitive).

Using the following custom qureries which convert the name part do 
lowercase, everything works as expected:

 gpgsql-insert-slave-query=insert into domains (type,name,master,account) 
values('SLAVE',lower('%s'),'%s','%s')
 gpgsql-insert-record-query=insert into records 
(content,ttl,prio,type,domain_id,name) values ('%s',%d,%d,'%s',%d,lower('%

I'd suggest to put these as default in the gpgsql backend or at least 
mention the problem within the documentation.

Regards

Volker Götz

- ---------------------------------------------------------------
section(one              Mail goetz at sectionone.de
Dipl.-Inform. Univ.      Web  http://www.sectionone.de/
Volker Götz              Tel. 0931/61 94 94-0
Unterer Weg 26           Fax  0931/61 94 94-15
97084 Würzburg           PGP  4FEB1C34 @ wwwkeys.de.pgp.net
- ---------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE+mxXoWM9gHU/rHDQRAgDjAJsECwqDCGTZW2MWPiFsOQLJpAl3xQCfYNK3
gKSPJKArsvhPNJPaxYAN4fY=
=Jrkq
-----END PGP SIGNATURE-----



More information about the Pdns-users mailing list