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

2024-04-20 Thread Justin Pryzby
On Fri, Apr 19, 2024 at 01:59:31PM +0200, Alvaro Herrera wrote: > BTW because of a concern from Justin that the NO INHERIT stuff will > cause errors in old server versions, I started to wonder if it wouldn't > be better to add these constraints in a separate line for compatibility, > so for example

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

2024-04-20 Thread Alvaro Herrera
On 2024-Apr-18, Andrew Dunstan wrote: > On 2024-04-18 Th 11:39, Alvaro Herrera wrote: > It's not that hard to make it go back to 9.2. Here's a version that's a > couple of years old, but it supports versions all the way back to 7.2 :-) Hmm, so I tried grabbing the old-version module definitions

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

2024-04-18 Thread Andrew Dunstan
On 2024-04-18 Th 11:39, Alvaro Herrera wrote: On 2024-Apr-18, Alvaro Herrera wrote: 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

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

2024-04-18 Thread Alvaro Herrera
On 2024-Apr-18, Alvaro Herrera wrote: > 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 al