Re: [HACKERS] Teaching pg_dump to use NOT VALID constraints

2014-11-14 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 11/13/14 5:07 AM, Simon Riggs wrote: > > On 13 November 2014 00:20, Jim Nasby wrote: > > > >> Isn't the real use-case here that if constraints were valid when you dumped > >> then we shouldn't have to *any* re-validate when we load? (Though, we'd > >> have > >> to be

Re: [HACKERS] Teaching pg_dump to use NOT VALID constraints

2014-11-13 Thread Peter Eisentraut
On 11/13/14 5:07 AM, Simon Riggs wrote: > On 13 November 2014 00:20, Jim Nasby wrote: > >> Isn't the real use-case here that if constraints were valid when you dumped >> then we shouldn't have to *any* re-validate when we load? (Though, we'd have >> to be careful of that with CHECK because that c

Re: [HACKERS] Teaching pg_dump to use NOT VALID constraints

2014-11-13 Thread Simon Riggs
On 13 November 2014 00:20, Jim Nasby wrote: > Isn't the real use-case here that if constraints were valid when you dumped > then we shouldn't have to *any* re-validate when we load? (Though, we'd have > to be careful of that with CHECK because that can call user code...) Yes, that is the use cas

Re: [HACKERS] Teaching pg_dump to use NOT VALID constraints

2014-11-12 Thread Jim Nasby
On 11/10/14, 12:00 PM, Simon Riggs wrote: On 10 November 2014 17:33, Alvaro Herrera wrote: pg_dump --no-revalidaton will add "NOT VALID" onto the recreation SQL for any FKs, but only for ones that were already known to be valid. Well. Constraints that haven't been validated already have

Re: [HACKERS] Teaching pg_dump to use NOT VALID constraints

2014-11-10 Thread Simon Riggs
On 10 November 2014 17:33, Alvaro Herrera wrote: >> pg_dump --no-revalidaton >> >> will add "NOT VALID" onto the recreation SQL for any FKs, but only for >> ones that were already known to be valid. > > Well. Constraints that haven't been validated already have a NOT VALID > emitted by ruleutil

Re: [HACKERS] Teaching pg_dump to use NOT VALID constraints

2014-11-10 Thread Alvaro Herrera
Simon Riggs wrote: > Magnus and I discussed the need for pg_dump to offer the use of NOT > VALID constraints. > Here's the patch. > > > pg_dump --no-revalidaton > > will add "NOT VALID" onto the recreation SQL for any FKs, but only for > ones that were already known to be valid. Well. Constra

[HACKERS] Teaching pg_dump to use NOT VALID constraints

2014-11-10 Thread Simon Riggs
Magnus and I discussed the need for pg_dump to offer the use of NOT VALID constraints. Here's the patch. pg_dump --no-revalidaton will add "NOT VALID" onto the recreation SQL for any FKs, but only for ones that were already known to be valid. -- Simon Riggs http://www.2ndQu