Small fix for _valueCopy()
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.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
Attachments:
VALUE.PATCHtext/plain; charset=us-ascii; name=VALUE.PATCHDownload+3-3
Fernando Nasser <fnasser@redhat.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