From: James Cloos Date: Wed, 16 Oct 2013 21:43:30 +0000 (-0400) Subject: Use the inet data type for supermasters.ip on postgrsql. X-Git-Tag: rec-3.6.0-rc1~362^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14a2e529ba85292f6ca8d8f2adfc5465d6b997e1;p=pdns Use the inet data type for supermasters.ip on postgrsql. Use pgsql’s inet data type for v4 and v6 IP addresses in the supermasters table. The guarantees that the address will fit, that the queries will return the addresses in canonical format, and correctness in that nothing other than an IP address can be stored in that column. Signed-off-by: James Cloos --- diff --git a/pdns/no-dnssec.schema.pgsql.sql b/pdns/no-dnssec.schema.pgsql.sql index b0f255bae..319b015ba 100644 --- a/pdns/no-dnssec.schema.pgsql.sql +++ b/pdns/no-dnssec.schema.pgsql.sql @@ -30,7 +30,7 @@ CREATE INDEX nametype_index ON records(name,type); CREATE INDEX domain_id ON records(domain_id); create table supermasters ( - ip VARCHAR(64) NOT NULL, + ip INET NOT NULL, nameserver VARCHAR(255) NOT NULL, account VARCHAR(40) DEFAULT NULL );