Allow lowercase only in Postgresql #426

Habbie opened this Issue Apr 26, 2013 · 1 comment


None yet

1 participant

Habbie commented Apr 26, 2013

Since PowerDNS converts all queries to lowercase before asking the DB backend it would make sense to add a constraint in PGSQL that allows only lowercase names:

CREATE TABLE records (
    id integer DEFAULT nextval('records_id_seq'::regclass) NOT NULL,
    domain_id integer NOT NULL,
    name character varying(255) NOT NULL,
    type character varying(10) NOT NULL,
    content character varying(255) NOT NULL,
    ttl integer DEFAULT 3600 NOT NULL,
    prio integer DEFAULT 0,
    change_date integer,
    ordername character varying(255),
    auth boolean DEFAULT true NOT NULL,
    CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
Habbie commented Apr 26, 2013

Author: peter
Fixed in r2503.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment