#1098943 pdns-backend-pgsql: please make comments per-rr

Package:
pdns-backend-pgsql
Source:
pdns-backend-pgsql
Description:
PostgreSQL backend for PowerDNS
Submitter:
Gregor Messner
Date:
2025-02-26 10:39:03 UTC
Severity:
normal
Tags:
#1098943#5
Date:
2025-02-26 09:35:30 UTC
From:
To:
Dear Maintainer,

I tried to add comments for TXT records. Most TXT records are not unique so the comments does not match the recrods:

Please see the pgsql schema:

CREATE TABLE records (
  id                    BIGSERIAL PRIMARY KEY,
  domain_id             INT DEFAULT NULL,
  name                  VARCHAR(255) DEFAULT NULL,
  type                  VARCHAR(10) DEFAULT NULL,
  content               VARCHAR(65535) DEFAULT NULL,
  ttl                   INT DEFAULT NULL,
  prio                  INT DEFAULT NULL,
  disabled              BOOL DEFAULT 'f',
  ordername             VARCHAR(255),
  auth                  BOOL DEFAULT 't',
  CONSTRAINT domain_exists
  FOREIGN KEY(domain_id) REFERENCES domains(id)
  ON DELETE CASCADE,
  CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
);

CREATE TABLE comments (
  id                    SERIAL PRIMARY KEY,
  domain_id             INT NOT NULL,
  name                  VARCHAR(255) NOT NULL,
  type                  VARCHAR(10) NOT NULL,
  modified_at           INT NOT NULL,
  account               VARCHAR(40) DEFAULT NULL,
  comment               VARCHAR(65535) NOT NULL,
  CONSTRAINT domain_exists
  FOREIGN KEY(domain_id) REFERENCES domains(id)
  ON DELETE CASCADE,
  CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
);

There should me a record_id in table records which references to the unique record id.

You will see this mostly with TXT because all other record types are more or less unique.

best regards
Gregor

#1098943#10
Date:
2025-02-26 10:35:09 UTC
From:
To:
Control: severity -1 wishlist
Control: retitle -1 pdns-backend-pgsql: please make comments per-rr
Control: tags -1 upstream wontfix
Control: forwarded -1 https://github.com/PowerDNS/pdns/issues/7270

By design, comments in PowerDNS Authoritative are per-RRset, and not
per RR.

I'm linking the upstream documentation bug, which wants to make this
more clear.