diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index c166a744592ba8bf712e522cf9b0c252dd60ab7e..f9a876f1495dc2b563c50996da836dcfd2332957 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.288 2002/03/08 04:37:17 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.289 2002/03/09 17:37:16 thomas Exp $
  *
  * HISTORY
  *	  AUTHOR			DATE			MAJOR EVENT
@@ -790,14 +790,16 @@ VariableSetStmt:  SET ColId TO var_value
 				{
 					VariableSetStmt *n = makeNode(VariableSetStmt);
 					n->name  = $2;
-					n->args = makeList1(makeStringConst($4, NULL));
+					if ($4 != NULL)
+						n->args = makeList1(makeStringConst($4, NULL));
 					$$ = (Node *) n;
 				}
 		| SET ColId '=' var_value
 				{
 					VariableSetStmt *n = makeNode(VariableSetStmt);
 					n->name  = $2;
-					n->args = makeList1(makeStringConst($4, NULL));
+					if ($4 != NULL)
+						n->args = makeList1(makeStringConst($4, NULL));
 					$$ = (Node *) n;
 				}
 		| SET TIME ZONE zone_value
@@ -826,7 +828,8 @@ VariableSetStmt:  SET ColId TO var_value
 				{
 					VariableSetStmt *n = makeNode(VariableSetStmt);
 					n->name  = "client_encoding";
-					n->args = makeList1(makeStringConst($3, NULL));
+					if ($3 != NULL)
+						n->args = makeList1(makeStringConst($3, NULL));
 					$$ = (Node *) n;
 				}
 		| SET SESSION AUTHORIZATION ColId_or_Sconst