From: | Mark <markdv(dot)psql(at)asphyx(dot)net> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Cc: | "Roderick A(dot) Anderson" <raanders(at)acm(dot)org> |
Subject: | Re: [Q] DNS(bind) ER model |
Date: | 2008-08-17 14:48:49 |
Message-ID: | 1218984529.3894.39.camel@velocity.nl.tiscali.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2008-08-14 at 16:20 -0700, Roderick A. Anderson wrote:
> Anyone aware of an ER model for holding name server records?
>
> Working on the zone file data and I am getting close but keep running
> into the differences between MX records (with a priority) and the others
> that can hold either a domain/sub-domain/host name or an IP address
> depending on whether is an A, TXT, PTR, etc. or a CNAME.
Don't add a column for the prio of the MX record. A lot of designs do
this but IMHO it's crap. If you do it for MX records you also have to do
it for SRV records and who knows what other (future) records).
We (@work) use an in house designed database that use the best technique
I've ever seen.
What it does is use a table to list all the valid RR types(1) along with
an ID and regular expressions that describe what the name and rdata
should look like.
In the table that holds the dns records the type of the record is
foreign key referencing the type table. And insert/update triggers are
used to check that records match the patters in the types table.
With this technique supporting a new record type is as easy as inserting
a new row in the types table. And it also garanties that all records in
the database is at least syntactically correct. (Assuming your patters
are correct of course.)
> Much of the database will be populated and changed automagically so the
> controller for the application will do the right thing but humans will
> get involved every so often. I hope I can get the database to make the
> right thing easy and the wrong thing "impossible" for them.
>
> Any suggestions?
HTH.
Cheers,
Mark.
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Koterov | 2008-08-17 16:03:27 | Re: How to execute 'set session role' from plpgsql function? |
Previous Message | Oleg Vasylenko | 2008-08-17 14:22:56 | How to execute 'set session role' from plpgsql function? |