The pgsqldns SQL Schema
pgsqldns makes use of two tables, domain and
entry.
domain must contain at least the following fields:
- id INT NOT NULL PRIMARY KEY
- name TEXT NOT NULL
entry must contain at least the following fields:
- prefix TEXT NOT NULL
- domain INT NOT NULL REFERENCES domain(id)
- ttl INT NOT NULL
- timestamp TIMESTAMP
- ip INET
- master_ip BOOL
- mx_name1 TEXT
- mx_name2 TEXT
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).
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.