>>>>> "MH" == Marc Haber <mh+debian-packa...@zugschlus.de> writes:

>> alter table supermasters alter COLUMN ip type inet using ip::inet;

>> and change the sql which creates the table during install to use inet
>> for that column.

MH> Can pdns handle that table format?

It is transparent to pdns.  I've been using it in production since
before I posted that.

Were pdns to try to store something in that column which wasn't an ip
address, pg would complain and the transaction would fail.

But pdns only reads that table, and the text returned from a SELECT on
an inet column looks like the normal text notation of an ipv4 or ipv6
address.

Were someone to store a cidr (such as 10.1.2.4/8) then pdns would
complain; but again the result would be no different than if one
were to store such data in a text or varchar field.

The column needs to be either text, varchar(39) or larger, or inet
to support all possible ipv4 and ipv6 addresses.  Inet has the benefit
of documenting the column's intent and rejecting most bogus data before
it can confuse or break pdns.

-JimC
-- 
James Cloos <cl...@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to