Thread
Commits
-
Remove duplicate set of print_notnull
- f104192e52fe 18.0 landed
-
Add pg_constraint rows for not-null constraints
- 14e87ffa5c54 18.0 cited
-
two occurrences of assign print_notnull within pg_dump.c
jian he <jian.universality@gmail.com> — 2025-04-03T11:00:47Z
hi. in src/bin/pg_dump/pg_dump.c within function dumpTableSchema: there are two occurrences of: print_notnull = (tbinfo->notnull_constrs[j] != NULL && (tbinfo->notnull_islocal[j] || dopt->binary_upgrade || tbinfo->ispartition)); we can delete the second one. to confirm delete the second is fine. I did run a test, and all tests are OK. -
Re: two occurrences of assign print_notnull within pg_dump.c
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> — 2025-04-03T11:22:08Z
On Thu, Apr 3, 2025 at 4:31 PM jian he <jian.universality@gmail.com> wrote: > > hi. > > in src/bin/pg_dump/pg_dump.c > within function dumpTableSchema: > there are two occurrences of: > print_notnull = (tbinfo->notnull_constrs[j] != NULL && > (tbinfo->notnull_islocal[j] || > dopt->binary_upgrade || > tbinfo->ispartition)); The same commit 14e87ffa5c543b5f30ead7413084c25f7735039f modified existing definition of print_notnull and added another. I wonder why. - probably just an oversight or define to closer to usage. But we don't do the latter. -- Best Wishes, Ashutosh Bapat
-
Re: two occurrences of assign print_notnull within pg_dump.c
Alvaro Herrera <alvherre@alvh.no-ip.org> — 2025-04-03T11:30:08Z
On 2025-Apr-03, Ashutosh Bapat wrote: > On Thu, Apr 3, 2025 at 4:31 PM jian he <jian.universality@gmail.com> wrote: > > > > hi. > > > > in src/bin/pg_dump/pg_dump.c > > within function dumpTableSchema: > > there are two occurrences of: > > print_notnull = (tbinfo->notnull_constrs[j] != NULL && > > (tbinfo->notnull_islocal[j] || > > dopt->binary_upgrade || > > tbinfo->ispartition)); > > The same commit 14e87ffa5c543b5f30ead7413084c25f7735039f modified > existing definition of print_notnull and added another. I wonder why. > - probably just an oversight or define to closer to usage. But we > don't do the latter. Hmm, this was probably a borked merge. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "The Gord often wonders why people threaten never to come back after they've been told never to return" (www.actsofgord.com)