Re: pgsql: Fix restore of not-null constraints with inheritance

2024-04-18 Thread Alvaro Herrera
On 2024-Apr-18, Alvaro Herrera wrote: > Lastly, make two changes to pg_dump: 1) do not try to drop a not-null > constraint that's marked as inherited; this allows a dump to restore > with no errors if a table with a PK inherits from another which also has > a PK; 2) avoid giving inherited constrai

pgsql: Fix restore of not-null constraints with inheritance

2024-04-18 Thread Alvaro Herrera
Fix restore of not-null constraints with inheritance In tables with primary keys, pg_dump creates tables with primary keys by initially dumping them with throw-away not-null constraints (marked "no inherit" so that they don't create problems elsewhere), to later drop them once the primary key is r