Re: Remove Value node struct

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove Value node struct
Date: 2021-08-25 14:00:13
Message-ID: 87pmu1vd3m.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> 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 structs of their own and behave mostly like
> normal node types.

This looks like a nice cleanup overall, independent of any future
refactoring.

> Also, this removes the T_Null node tag, which was previously also a
> possible variant of Value but wasn't actually used outside of the
> Value contained in A_Const. Replace that by an isnull field in
> A_Const.

However, the patch adds:

> +typedef struct Null
> +{
> + NodeTag type;
> + char *val;
> +} Null;

which doesn't seem to be used anywhere. Is that a leftoverf from an
intermediate development stage?

- ilmari

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajin Cherian 2021-08-25 14:04:23 Re: Failure of subscription tests with topminnow
Previous Message Robert Haas 2021-08-25 13:56:56 Re: prevent immature WAL streaming