Re: About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Andy Fan
On Wed, Nov 25, 2020 at 11:54 AM Tom Lane wrote: > Andy Fan writes: > > On Wed, Nov 25, 2020 at 9:40 AM Tom Lane wrote: > >> What exactly would be the value of that? > >> ... > > > I agree with this, but I don't think there is no value in my suggestion > > unless I missed something. Per my curr

Re: About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Tom Lane
Andy Fan writes: > On Wed, Nov 25, 2020 at 9:40 AM Tom Lane wrote: >> What exactly would be the value of that? >> ... > I agree with this, but I don't think there is no value in my suggestion > unless I missed something. Per my current understanding, the code > is too easy to make the datadir in

Re: About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Andy Fan
On Wed, Nov 25, 2020 at 9:40 AM Tom Lane wrote: > Andy Fan writes: > > What I mean here is something like below. > > What exactly would be the value of that? > > There is work afoot, or at least on people's to-do lists, to mechanize > creation of the outfuncs/readfuncs/etc code directly from the

Re: About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Tom Lane
Andy Fan writes: > What I mean here is something like below. What exactly would be the value of that? There is work afoot, or at least on people's to-do lists, to mechanize creation of the outfuncs/readfuncs/etc code directly from the Node struct declarations. So special cases for particular fi

Re: About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Andy Fan
On Wed, Nov 25, 2020 at 8:10 AM Andy Fan wrote: > > > On Tue, Nov 24, 2020 at 11:11 PM Alvaro Herrera > wrote: > >> On 2020-Nov-24, Andy Fan wrote: >> >> > then we modified the copy/read/out functions for this node. In >> > _readFuncExpr, >> > we probably add something like >> >> > [ ... ] >> >

Re: About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Andy Fan
On Tue, Nov 24, 2020 at 11:11 PM Alvaro Herrera wrote: > On 2020-Nov-24, Andy Fan wrote: > > > then we modified the copy/read/out functions for this node. In > > _readFuncExpr, > > we probably add something like > > > [ ... ] > > > Then we will get a compatible issue if we create a view with the

Re: About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Alvaro Herrera
On 2020-Nov-24, Andy Fan wrote: > then we modified the copy/read/out functions for this node. In > _readFuncExpr, > we probably add something like > [ ... ] > Then we will get a compatible issue if we create a view with the node in > the older version and access the view with the new binary. W

About adding a new filed to a struct in primnodes.h

2020-11-24 Thread Andy Fan
Hi: For example, we added a new field in a node in primnodes.h struct FuncExpr { + int newf; }; then we modified the copy/read/out functions for this node. In _readFuncExpr, we probably add something like static FuncExpr _readFuncExpr(..) { .. + READ_INT_FILED(newf); }; Then we will get a