Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-16 Thread Robert Haas
On Wed, Dec 16, 2015 at 3:34 AM, amul sul wrote: > Updated patch to add this table creation case in regression tests. > PFA patch version V3. I committed the previous version just now after fixing various things. In particular, you added a function called from one place

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-16 Thread amul sul
Updated patch to add this table creation case in regression tests. PFA patch version V3. Regards, Amul Sul transformCheckConstraints-function-to-overrid-not-valid_V3.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-09 Thread amul sul
>On Wednesday, 9 December 2015 12:55 PM, Amit Langote > wrote: >Thoughts? Wondering, have you notice failed regression tests? I have tried with new transformCheckConstraints() function & there will be small fix in gram.y. Have look into attached patch &

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-09 Thread Amit Langote
On Wednesday, 9 December 2015, amul sul wrote: > >On Wednesday, 9 December 2015 12:55 PM, Amit Langote < > langote_amit...@lab.ntt.co.jp > wrote: > > >Thoughts? > > Wondering, have you notice failed regression tests? I did, I couldn't send an updated patch

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-09 Thread Amit Langote
On 2015/12/09 18:07, amul sul wrote: >> On Wednesday, 9 December 2015 12:55 PM, Amit Langote >> wrote: > >> Thoughts? > > Wondering, have you notice failed regression tests? Here is the updated patch. > I have tried with new transformCheckConstraints() function

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-09 Thread Amit Langote
On 2015/12/10 13:12, amul sul wrote: >> On Thursday, 10 December 2015 8:22 AM, Amit Langote >> wrote: > > >> You forgot to put braces around the if block. > > > Does this really required? If nothing else, for consistency with surrounding code. Take a look at

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-09 Thread amul sul
>On Thursday, 10 December 2015 10:13 AM, Amit Langote > wrote: >On 2015/12/10 13:38, Amit Langote wrote: >> >> Take a look at a similar code block in transformFKConstraints >> (parse_utilcmd.c: line 1935), or transformIndexConstraint >> (parse_utilcmd.c: line

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-09 Thread Amit Langote
On 2015/12/10 13:38, Amit Langote wrote: > > Take a look at a similar code block in transformFKConstraints > (parse_utilcmd.c: line 1935), or transformIndexConstraint > (parse_utilcmd.c: line 1761). Oops, forget the second one. Thanks, Amit -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-09 Thread amul sul
>On Thursday, 10 December 2015 8:22 AM, Amit Langote > wrote: >You forgot to put braces around the if block. Does this really required? Regards, Amul Sul -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-08 Thread Robert Haas
On Thu, Dec 3, 2015 at 3:52 AM, amul sul wrote: > Hi ALL, > > Need your suggestions. > initially_valid flag is added to make column constraint valid. (commit : > http://www.postgresql.org/message-id/e1q2ak9-0006hk...@gemulon.postgresql.org) > > > IFAICU, initially_valid and

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-08 Thread Amit Langote
On 2015/12/09 5:50, Robert Haas wrote: > On Thu, Dec 3, 2015 at 3:52 AM, amul sul wrote: >> Can we pass initially_valid instead of !skip_validation to StoreRelCheck() >> in AddRelationNewConstraints(), as shown below? > > The comments say this: > > * If skip_validation

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-08 Thread Amit Langote
On 2015/12/09 11:19, Amit Langote wrote: > On 2015/12/09 5:50, Robert Haas wrote: >> I suspect this is an oversight. We allowed FOREIGN KEY constraints to >> be not valid in 722bf7017bbe796decc79c1fde03e7a83dae9ada by Simon >> Riggs, but didn't add allow it for CHECK constraints until Alvaro's >>

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-03 Thread amul sul
let me put it in other words, is there any harm use of initially_valid instead of !skip_validation? Earlier to commit I mentioned in my first post, there is only one flag, IMO i.e. skip_validation, which are serving both purpose, setting pg_constraint.convalidated & decide to skip or validate

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-03 Thread amul sul
Hi Amit, Thanks for prompt response. >On Thursday, 3 December 2015 4:36 PM, Amit Langote > wrote: >Especially from a readability standpoint, I think using skip_validation may be >more apt. >Why - the corresponding parameter of StoreRelCheck() dictates what's

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-03 Thread Marko Tiikkaja
On 12/3/15 12:44 PM, amul sul wrote: On Thursday, 3 December 2015 4:36 PM, Amit Langote wrote: The user will have to separately validate the constraint by issuing a ALTER TABLE VALIDATE CONSTRAINT command at a time of their choosing. This could be time

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-03 Thread Amit Langote
Hi Amul! On 2015/12/03 17:52, amul sul wrote: > Hi ALL, > > Need your suggestions. > initially_valid flag is added to make column constraint valid. (commit : > http://www.postgresql.org/message-id/e1q2ak9-0006hk...@gemulon.postgresql.org) > > > IFAICU, initially_valid and skip_validation

Re: [HACKERS] Passing initially_valid values instead of !skip_validation to StoreRelCheck() in AddRelationNewConstraints()

2015-12-03 Thread Amit Langote
On 2015/12/03 20:44, amul sul wrote: >> On Thursday, 3 December 2015 4:36 PM, Amit Langote >> wrote: >> Especially from a readability standpoint, I think using skip_validation may >> be more apt. >> Why - the corresponding parameter of StoreRelCheck() dictates