]> granicus.if.org Git - pdns/commitdiff
Use the inet data type for supermasters.ip on postgrsql.
authorJames Cloos <cloos@jhcloos.com>
Wed, 16 Oct 2013 21:43:30 +0000 (17:43 -0400)
committerJames Cloos <cloos@jhcloos.com>
Wed, 16 Oct 2013 21:43:30 +0000 (17:43 -0400)
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 <cloos@jhcloos.com>
pdns/no-dnssec.schema.pgsql.sql

index b0f255bae579fd23442ecc842ae529ab9003376e..319b015ba88bc90776a5020e509f9082a6877acc 100644 (file)
@@ -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
 );