bc5dde
			PGSQL BIND SDB driver
bc5dde
bc5dde
The postgresql BIND SDB driver is of experimental status and should not be 
bc5dde
used for production systems.
bc5dde
bc5dde
Usage:
bc5dde
bc5dde
o Use the named_sdb process ( put ENABLE_SDB=yes in /etc/sysconfig/named )
bc5dde
bc5dde
o Edit your named.conf to contain a database zone, eg. :
bc5dde
  
bc5dde
zone "pgdb.net." IN {
bc5dde
        type master;
bc5dde
        database "pgsql  bind        pgdb     localhost pguser pgpasswd";
bc5dde
        #                ^- DB name  ^-Table  ^-host    ^-user ^-password
bc5dde
};
bc5dde
bc5dde
o Create the database zone table
bc5dde
  The table must contain the columns "name", "rdtype", and "rdata", and
bc5dde
  is expected to contain a properly constructed zone.  The program "zonetodb"
bc5dde
  creates such a table.
bc5dde
  
bc5dde
  zonetodb usage:
bc5dde
    
bc5dde
    zonetodb origin file dbname dbtable
bc5dde
bc5dde
    where
bc5dde
	origin : zone origin, eg "pgdb.net."
bc5dde
	file   : master zone database file, eg. pgdb.net.db
bc5dde
	dbname : name of postgresql database 
bc5dde
        dbtable: name of table in database
bc5dde
bc5dde
    Eg. to import this zone in the file 'pgdb.net.db' into the 'bind' database 
bc5dde
        'pgdb' table:
bc5dde
bc5dde
---
bc5dde
#pgdb.net.db:
bc5dde
$TTL 1H
bc5dde
@       SOA     localhost.      root.localhost. (       1
bc5dde
                                                3H
bc5dde
                                                1H
bc5dde
                                                1W
bc5dde
                                                1H )
bc5dde
        NS      localhost.
bc5dde
host1   A       192.168.2.1
bc5dde
host2   A       192.168.2.2
bc5dde
host3   A       192.168.2.3
bc5dde
host4   A       192.168.2.4
bc5dde
host5   A       192.168.2.5
bc5dde
host6   A       192.168.2.6
bc5dde
host7   A       192.168.2.7
bc5dde
---
bc5dde
bc5dde
Issue this command as the pgsql user authorized to update the bind database:
bc5dde
 
bc5dde
# zonetodb pgdb.net. pgdb.net.db bind pgdb
bc5dde
bc5dde
will create / update the pgdb table in the 'bind' db:
bc5dde
bc5dde
$ psql -dbind -c 'select * from pgdb;'
bc5dde
      name      | ttl  | rdtype |                        rdata
bc5dde
----------------+------+--------+-----------------------------------------------------
bc5dde
 pgdb.net       | 3600 | SOA    | localhost. root.localhost. 1 10800 3600 604800 3600
bc5dde
 pgdb.net       | 3600 | NS     | localhost.
bc5dde
 host1.pgdb.net | 3600 | A      | 192.168.2.1
bc5dde
 host2.pgdb.net | 3600 | A      | 192.168.2.2
bc5dde
 host3.pgdb.net | 3600 | A      | 192.168.2.3
bc5dde
 host4.pgdb.net | 3600 | A      | 192.168.2.4
bc5dde
 host5.pgdb.net | 3600 | A      | 192.168.2.5
bc5dde
 host6.pgdb.net | 3600 | A      | 192.168.2.6
bc5dde
 host7.pgdb.net | 3600 | A      | 192.168.2.7
bc5dde
(9 rows)
bc5dde
bc5dde
I've tested exactly the above configuration with bind-sdb-9.3.1+ and it works OK.
bc5dde
bc5dde
NOTE: If you use pgsqldb SDB, ensure the postgresql service is started before the named
bc5dde
      service .
bc5dde
bc5dde
USE AT YOUR OWN RISK!