Re: Remove Value node struct

2021-09-09 Thread Peter Eisentraut
On 08.09.21 04:04, Kyotaro Horiguchi wrote: At Tue, 7 Sep 2021 11:22:24 +0200, Peter Eisentraut wrote in On 30.08.21 04:13, Kyotaro Horiguchi wrote: + else if (IsA(obj, Integer)) + _outInteger(str, (Integer *) obj); + else if (IsA(obj, Float)) +

Re: Remove Value node struct

2021-09-07 Thread Kyotaro Horiguchi
At Tue, 7 Sep 2021 11:22:24 +0200, Peter Eisentraut wrote in > On 30.08.21 04:13, Kyotaro Horiguchi wrote: > > + else if (IsA(obj, Integer)) > > + _outInteger(str, (Integer *) obj); > > + else if (IsA(obj, Float)) > > + _outFloat(str, (Float *) obj); > > I felt that the

Re: Remove Value node struct

2021-09-07 Thread Peter Eisentraut
mmands/statscmds.c @@ -335,7 +335,7 @@ CreateStatistics(CreateStatsStmt *stmt) build_mcv = false; foreach(cell, stmt->stat_types) { - char *type = strVal((Value *) lfirst(cell)); + char *type = strVal(lfirst(cell));

Re: Remove Value node struct

2021-08-29 Thread Kyotaro Horiguchi
Agree to the motive and +1 for the concept. At Wed, 25 Aug 2021 15:00:13 +0100, Dagfinn Ilmari Mannsåker wrote in > However, the patch adds: > > > +typedef struct Null > > +{ > > + NodeTag type; > > + char *val; > > +} Null; > > which doesn't seem to be used anywhere. Is

Re: Remove Value node struct

2021-08-27 Thread Julien Rouhaud
On Wed, Aug 25, 2021 at 9:49 PM Robert Haas wrote: > > On Wed, Aug 25, 2021 at 9:20 AM Peter Eisentraut > wrote: > > This change removes the Value struct and node type and replaces them > > by separate Integer, Float, String, and BitString node types that are > > proper node types and structs of

Re: Remove Value node struct

2021-08-25 Thread Dagfinn Ilmari Mannsåker
Peter Eisentraut writes: > While trying to refactor the node support in various ways, the Value > node is always annoying. […] > This change removes the Value struct and node type and replaces them > by separate Integer, Float, String, and BitString node types that are > proper node types and

Re: Remove Value node struct

2021-08-25 Thread Robert Haas
On Wed, Aug 25, 2021 at 9:20 AM Peter Eisentraut wrote: > This change removes the Value struct and node type and replaces them > by separate Integer, Float, String, and BitString node types that are > proper node types and structs of their own and behave mostly like > normal node types. +1. I

Remove Value node struct

2021-08-25 Thread Peter Eisentraut
mt *stmt) build_mcv = false; foreach(cell, stmt->stat_types) { - char *type = strVal((Value *) lfirst(cell)); + char *type = strVal(lfirst(cell)); if (strcmp(type, "ndistinct") == 0) { -- 2.33