Re: Remove redundant variable from transformCreateStmt - Mailing list pgsql-hackers

From Amul Sul
Subject Re: Remove redundant variable from transformCreateStmt
Date
Msg-id CAAJ_b94M_1YoybQpNjmD+ZFZkUT2OpoP5xnFiWM+X=xh-nX23Q@mail.gmail.com
Whole thread Raw
In response to Re: Remove redundant variable from transformCreateStmt  (Amul Sul <sulamul@gmail.com>)
Responses Re: Remove redundant variable from transformCreateStmt  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: Remove redundant variable from transformCreateStmt  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Mon, Apr 19, 2021 at 9:28 AM Amul Sul <sulamul@gmail.com> wrote:
>
> On Fri, Apr 16, 2021 at 6:26 AM Bharath Rupireddy
> <bharath.rupireddyforpostgres@gmail.com> wrote:
> >
> > On Thu, Apr 15, 2021 at 8:40 PM Jeevan Ladhe
> > <jeevan.ladhe@enterprisedb.com> wrote:
> > > IMHO, I think the idea here was to just get rid of an unnecessary variable
> > > rather than refactoring.
> > >
> > > On Thu, Apr 15, 2021 at 5:48 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
> > >>
> > >> On Thu, Apr 15, 2021 at 5:04 PM Amul Sul <sulamul@gmail.com> wrote:
> > >> >
> > >> > Hi,
> > >> >
> > >> > Attached patch removes "is_foreign_table" from transformCreateStmt()
> > >> > since it already has cxt.isforeign that can serve the same purpose.
> > >>
> > >> Yeah having that variable as "is_foreign_table" doesn't make sense
> > >> when we have the info in ctx. I'm wondering whether we can do the
> > >> following (like transformFKConstraints). It will be more readable and
> > >> we could also add more comments on why we don't skip validation for
> > >> check constraints i.e. constraint->skip_validation = false in case for
> > >> foreign tables.
> > >
> > > To address your concern here, I think it can be addressed by adding a comment
> > > just before we make a call to transformCheckConstraints().
> >
> > +1.
>
> Ok, added the comment in the attached version.

Kindly ignore the previous version -- has unnecessary change.
See the attached.

Regards,
Amul

Attachment

pgsql-hackers by date:

Previous
From: Amul Sul
Date:
Subject: Re: Remove redundant variable from transformCreateStmt
Next
From: Amit Kapila
Date:
Subject: Re: PG Docs - CREATE SUBSCRIPTION option list order