The pgsqldns SQL Schema

pgsqldns makes use of two tables, domain and entry.

domain must contain at least the following fields:

entry must contain at least the following fields:

If timestamp is set and ttl is zero, the TTL sent in the record is set such that the record will expire no later than the given time, and after the given time is reached the record is no longer served out. If timestamp is set and ttl is not zero, the record is only served out after the given time (with its TTL as indicated).

type must be one of the following:

All other types are currently ignored.

These tables may contain any additional fields. It is recommended to index on domain(name), entry(prefix,domain), and on entry(ip) for maximum performance, as these are the fields used as select keys.

The pgsqldnscache SQL Schema

This program needs one table dnscache. It has the following fields: This table must be created WITH OIDS, because OIDS are used by cleanup function cleandnscache(bool). If you call this function with true argument, all expired records are removed from cache. When called with false, only duplicate records are removed (The same record can be inserted into database more times).