Re: Small fix for _valueCopy()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fernando Nasser <fnasser(at)redhat(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Small fix for _valueCopy()
Date: 2002-03-08 04:53:03
Message-ID: 5624.1015563183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Fernando Nasser <fnasser(at)redhat(dot)com> writes:
> Protect against a T_String Value (or other pointer Value) Value
> where the pointer is NULL.
> If we don't do it, _copyVariableSet() dumps core.

I believe that this change and the corresponding one in equalfuncs
should not be applied. A Value struct containing a null string
pointer is not a valid node. (The counterexample showing why
it should not be considered a useful representation of null-ness
is that there'd be no equivalent representation for null integer
Values.)

As with ConstraintsSetStmt, the correct fix is to change the
representation of a SET foo TO DEFAULT command. Thomas indicated
some interest in handling this detail; if he doesn't get around to
it, I will, or you can.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-03-08 05:05:11 Re: Basic DOMAIN Support
Previous Message Bruce Momjian 2002-03-08 04:51:52 Index USING in pg_dump