From 14a2e529ba85292f6ca8d8f2adfc5465d6b997e1 Mon Sep 17 00:00:00 2001 From: James Cloos Date: Wed, 16 Oct 2013 17:43:30 -0400 Subject: [PATCH] Use the inet data type for supermasters.ip on postgrsql. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- pdns/no-dnssec.schema.pgsql.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/no-dnssec.schema.pgsql.sql b/pdns/no-dnssec.schema.pgsql.sql index b0f255bae5..319b015ba8 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 ); -- 2.47.2