pg_dump fails on domain constraint comments

From: Elvis Pranskevichus <elprans(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: pg_dump fails on domain constraint comments
Date: 2016-01-11 22:56:32
Message-ID: 3789929.ZsF6ME7o6i@klinga.prans.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Alvaro,

It looks like pg_dump emits incorrect text for domain constraint comments:

Assuming the following structure,

CREATE DOMAIN "dom" AS integer
CONSTRAINT "dom_constraint" CHECK ((VALUE > 10));

COMMENT ON CONSTRAINT "dom_constraint" ON DOMAIN "dom" IS 'domain constraint comment'

pg_dump will dump the COMMENT as follow:

COMMENT ON CONSTRAINT "dom_constraint" ON DOMAIN """dom""" IS 'domain constraint comment'

Note the double-quoting issue of the domain name.

Attached patch fixes that.

Elvis

Attachment Content-Type Size
0001-pg_dump-Fix-dumping-of-comments-on-domain-constraint.patch text/x-patch 851 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stas Kelvich 2016-01-11 23:11:12 Re: Speedup twophase transactions
Previous Message Edson Richter 2016-01-11 22:44:34 Re: Driver behaves differently with prepareThreshold and timestamp fields when daylights is active (was Re: Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102)