Re: pg_dump does not dump domain not-null constraint's comments

2025-05-22 Thread jian he
hi. "Catalog domain not-null constraints" commit[1] doesn't have a pg_dump test. I actually found another bug. create schema test; CREATE DOMAIN test.d1 AS integer NOT NULL default 11; pg_dump --schema=test > 1.sql "" pg_dump: warning: could not resolve dependency loop among these items: pg_dump

Re: pg_dump does not dump domain not-null constraint's comments

2025-05-07 Thread jian he
On Wed, May 7, 2025 at 10:56 PM Álvaro Herrera wrote: > > Ooh, you know what? I ran your the CREATE DOMAIN statement in your new > test and pg_dump'ed that, and as far as I can tell the _name_ of the > not-null constraint is not dumped either. So it's not just the comment > that we're losing. T

Re: pg_dump does not dump domain not-null constraint's comments

2025-05-07 Thread Álvaro Herrera
Ooh, you know what? I ran your the CREATE DOMAIN statement in your new test and pg_dump'ed that, and as far as I can tell the _name_ of the not-null constraint is not dumped either. So it's not just the comment that we're losing. That's a separate bug, and probably needs to be fixed first, altho

Re: pg_dump does not dump domain not-null constraint's comments

2025-05-07 Thread jian he
ump test, I have added some changes on src/bin/pg_dump/t/002_pg_dump.pl, but it fails the tests v2-0001 ensures pg_dump dump domain not-null constraint's comments v2-0002 change some variable/argument/struct element name because of v2-0001. From e1f94b2b1f21ca8f285b40efe87e1ed64e52b0d1 Mon Sep 17

Re: pg_dump does not dump domain not-null constraint's comments

2025-05-07 Thread Álvaro Herrera
On 2025-May-07, jian he wrote: > in PG17 and master, pg_dump (--schema=test --no-owner) > [...] > didn't produce > COMMENT ON CONSTRAINT nn ON DOMAIN test.d1 IS 'not null constraint on > domain d1'; > we should make pg_dump to produce it too? Yes, this is clearly a pg17 bug whose fix should be ba

pg_dump does not dump domain not-null constraint's comments

2025-05-07 Thread jian he
:00:00 2001 From: jian he Date: Wed, 7 May 2025 16:59:35 +0800 Subject: [PATCH v1 1/1] pg_dump does not dump domain not-null constraint's comments this patch trying to resolve this issue. discussion: https://postgr.es/m/ --- src/bin/pg_dump/pg_dump.c | 66 ++-