diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml
index a88e767f037a687ae1c4cdab2e49fd83078b4d8a..2e84f539bd541003ab2bbbb4246a89bccf434b41 100644
--- a/doc/src/sgml/ref/set.sgml
+++ b/doc/src/sgml/ref/set.sgml
@@ -413,64 +413,12 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
 	  <para>
 		The frontend may be initialized by setting PGGEQO
 		environment variable.
-	 
-		<variablelist>
-		  
-		  <varlistentry>
-			<term>
-			  R_PLANS
-			</term>
-			<listitem>
-			  <para>
-				Determines whether right-hand plan evaluation is allowed:
-			  </para>
-			  
-			  <variablelist>
-				<varlistentry>
-				  <term>
-					On
-				  </term>
-				  <listitem>
-					<para>
-					  enables right-hand evaluation of plans.
-					</para>
-				  </listitem>
-				</varlistentry>
-				
-				<varlistentry>
-				  <term>
-					Off
-				  </term>
-				  <listitem>
-					<para>
-					  disables right-hand evaluation of plans.
-					</para>
-				  </listitem>
-				</varlistentry>
-				
-				<varlistentry>
-				  <term>
-					DEFAULT
-				  </term>
-				  <listitem>
-					<para>
-					  Equivalent to specifying <command>SET R_PLANS='off'</command>.
-					</para>
-				  </listitem>
-				</varlistentry>
-			  </variablelist>
-			</listitem>
-		  </varlistentry>
-		</variablelist>
 	  </para>
 	  <para>
 		It may be useful when joining big relations with
 		small ones. This algorithm is off by default.
 		It's not used by GEQO anyway.
-	  </para>
-	  <para>
-		The frontend may be initialized by setting the PGRPLANS
-		environment variable.
+
 		<variablelist>
 		  <varlistentry>
 			<term>
@@ -527,7 +475,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
 		It's not used by GEQO anyway.
 	  </para>
 	  <para>
-		The frontend may be initialized by setting the PGRPLANS
+		The frontend may be initialized by setting the PGKSQO
 		environment variable.
 		<variablelist>
 		  <varlistentry>
@@ -686,11 +634,6 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
 	  --
 	  SET GEQO = DEFAULT;
 	</programlisting>
-	<programlisting> 
-	  --Turn on right-hand evaluation of plans:
-	  --
-	  SET R_PLANS TO 'on';
-	</programlisting>
 	<programlisting> 
 	  --set the timezone for Berkeley, California:
 	  SET TIME ZONE 'PST8PDT';
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 06b16986333720520044fdc8d889e8f15d48ccea..66f75c5f06248b9f1ad357c3b1f3a9ac9d7ecf08 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -2,7 +2,7 @@
  * Routines for handling of 'SET var TO',
  *	'SHOW var' and 'RESET var' statements.
  *
- * $Id: variable.c,v 1.18 1998/12/18 09:10:20 vadim Exp $
+ * $Id: variable.c,v 1.19 1999/02/18 06:00:44 momjian Exp $
  *
  */
 
@@ -36,9 +36,6 @@ static bool parse_cost_heap(const char *);
 static bool show_cost_index(void);
 static bool reset_cost_index(void);
 static bool parse_cost_index(const char *);
-static bool show_r_plans(void);
-static bool reset_r_plans(void);
-static bool parse_r_plans(const char *);
 static bool reset_geqo(void);
 static bool show_geqo(void);
 static bool parse_geqo(const char *);
@@ -58,7 +55,6 @@ extern Cost _cpu_page_wight_;
 extern Cost _cpu_index_page_wight_;
 extern bool _use_geqo_;
 extern int32 _use_geqo_rels_;
-extern bool _use_right_sided_plans_;
 extern bool _use_keyset_query_optimizer;
 
 /*
@@ -242,53 +238,6 @@ reset_geqo(void)
 	return TRUE;
 }
 
-/*
- *
- * R_PLANS
- *
- */
-static bool
-parse_r_plans(const char *value)
-{
-	if (value == NULL)
-	{
-		reset_r_plans();
-		return TRUE;
-	}
-
-	if (strcasecmp(value, "on") == 0)
-		_use_right_sided_plans_ = true;
-	else if (strcasecmp(value, "off") == 0)
-		_use_right_sided_plans_ = false;
-	else
-		elog(ERROR, "Bad value for Right-sided Plans (%s)", value);
-
-	return TRUE;
-}
-
-static bool
-show_r_plans()
-{
-
-	if (_use_right_sided_plans_)
-		elog(NOTICE, "Right-sided Plans are ON");
-	else
-		elog(NOTICE, "Right-sided Plans are OFF");
-	return TRUE;
-}
-
-static bool
-reset_r_plans()
-{
-
-#ifdef USE_RIGHT_SIDED_PLANS
-	_use_right_sided_plans_ = true;
-#else
-	_use_right_sided_plans_ = false;
-#endif
-	return TRUE;
-}
-
 /*
  *
  * COST_HEAP
@@ -659,9 +608,6 @@ struct VariableParsers
 	{
 		"geqo", parse_geqo, show_geqo, reset_geqo
 	},
-	{
-		"r_plans", parse_r_plans, show_r_plans, reset_r_plans
-	},
 #ifdef MULTIBYTE
 	{
 		"client_encoding", parse_client_encoding, show_client_encoding, reset_client_encoding
diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c
index 146584d5a1e67e4c9da1b43373c2efdbeaa2f453..8add86750b926606b54bac5c5546418c0230ca27 100644
--- a/src/backend/optimizer/path/joinrels.c
+++ b/src/backend/optimizer/path/joinrels.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.29 1999/02/18 05:26:19 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.30 1999/02/18 06:00:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -23,14 +23,6 @@
 #include "optimizer/joininfo.h"
 #include "optimizer/pathnode.h"
 
-#ifdef USE_RIGHT_SIDED_PLANS
-bool		_use_right_sided_plans_ = true;
-
-#else
-bool		_use_right_sided_plans_ = false;
-
-#endif
-
 static List *new_joininfo_list(List *joininfo_list, Relids join_relids);
 static bool nonoverlap_sets(List *s1, List *s2);
 static bool is_subset(List *s1, List *s2);
@@ -122,8 +114,7 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
 				join_list = lappend(join_list, joined_rel);
 
 				/* Right-sided plan */
-				if (_use_right_sided_plans_ &&
-					length(old_rel->relids) > 1)
+				if (length(old_rel->relids) > 1)
 				{
 					joined_rel = make_join_rel(
 								get_base_rel(root, lfirsti(unjoined_relids)),
@@ -133,7 +124,7 @@ make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
 				}
 			}
 
-			if (BushyPlanFlag && only_relids == NIL) /* no bushy from geqo */
+			if (only_relids == NIL) /* no bushy from geqo */
 			{
 				List *r;
 
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 49c652f51c9ffc10920c2fcabffc798f4c5981ef..772a59b7c22c9603f3e88ecf43034ad62fe388fb 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.102 1999/02/18 05:26:24 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.103 1999/02/18 06:00:49 momjian Exp $
  *
  * NOTES
  *	  this is the "main" module of the postgres backend and
@@ -907,7 +907,7 @@ usage(char *progname)
 	fprintf(stderr,
 			"Usage: %s [options] [dbname]\n", progname);
 #ifdef USE_ASSERT_CHECKING
-	fprintf(stderr, "    A: enable/disable assert checking\n");
+	fprintf(stderr, "\t-A enable/disable assert checking\n");
 #endif
 	fprintf(stderr, "\t-B buffers\tset number of buffers in buffer pool\n");
 	fprintf(stderr, "\t-C \t\tsupress version info\n");
@@ -1017,7 +1017,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
 	optind = 1;					/* reset after postmaster usage */
 
 	while ((flag = getopt(argc, argv,
-						  "A:B:bCD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"))
+						  "A:B:CD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"))
 		   != EOF)
 		switch (flag)
 		{
@@ -1522,7 +1522,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
 	if (!IsUnderPostmaster)
 	{
 		puts("\nPOSTGRES backend interactive interface ");
-		puts("$Revision: 1.102 $ $Date: 1999/02/18 05:26:24 $\n");
+		puts("$Revision: 1.103 $ $Date: 1999/02/18 06:00:49 $\n");
 	}
 
 	/* ----------------
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 7ec84fa5729d91f864138568fb533308ad1a5968..79b10aec04987404d7e4c5a44b60b9b904f56270 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.92 1999/02/13 23:22:40 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.93 1999/02/18 06:01:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -136,9 +136,6 @@ static struct EnvironmentOptions
 	{
 		"PGCOSTINDEX", "cost_index"
 	},
-	{
-		"PGRPLANS", "r_plans"
-	},
 	{
 		"PGGEQO", "geqo"
 	},
diff --git a/src/man/set.l b/src/man/set.l
index d47e571ac3766062e78132920a3195017dcb1323..281a76201975b6bfdb628d4b36188544ec0db317 100644
--- a/src/man/set.l
+++ b/src/man/set.l
@@ -1,6 +1,6 @@
 .\" This is -*-nroff-*-
 .\" XXX standard disclaimer belongs here....
-.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.14 1999/02/14 04:57:02 momjian Exp $
+.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.15 1999/02/18 06:01:11 momjian Exp $
 .TH SET SQL 05/14/97 PostgreSQL PostgreSQL
 .SH NAME
 set - set run-time parameters for session
@@ -60,24 +60,6 @@ for more information.
 	on=10	- use for statements with 10 or more tables
 	off	- do not use the genetic optimizer
 .fi
-.PP
-.IR R_PLANS
-enables or disables right-hand evaluation of plans. It may be useful
-when joining big relations with small ones. This algorithm is
-.IR off
-by default. It's not used by GEQO anyway.
-
-.if n .ta 5 +15 +40
-.if t .ta 0.5i +1.5i +3.0i
-.in 0
-.nf
-.ce 1
-\fBR_PLANS Values\fR
-
-	on	- turn right-hand plan evaluation 'on'
-	off	- do not use right-hand plan evaluation
-.fi
-
 .PP
 .IR QUERY_LIMIT
 restricts the number of rows returned by a query.