diff --git a/doc/src/sgml/ref/createlang.sgml b/doc/src/sgml/ref/createlang.sgml
index 3cdd4c6731773d532a0e27ccd6dbecb39c7c34d2..454fa980446781af6bced5c4f662c54cbd767f9f 100644
--- a/doc/src/sgml/ref/createlang.sgml
+++ b/doc/src/sgml/ref/createlang.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.5 2000/03/27 17:14:42 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.6 2000/05/15 16:12:38 momjian Exp $
 Postgres documentation
 -->
 
@@ -24,7 +24,7 @@ Postgres documentation
   </refsynopsisdivinfo>
   <synopsis>
 createlang [ <replaceable class="parameter">connection options</replaceable> ] [ <replaceable class="parameter">langname</replaceable> [ <replaceable class="parameter">dbname</replaceable> ] ]
-createlang [ <replaceable class="parameter">connection options</replaceable> ] --list|-l
+createlang [ <replaceable class="parameter">connection options</replaceable> ] --list|-l [ <replaceable class="parameter">dbname</replaceable> ]
   </synopsis>
 
   <refsect2 id="R2-APP-CREATELANG-1">
diff --git a/src/bin/scripts/createlang.sh b/src/bin/scripts/createlang.sh
index fd5a9fbe957c8c638e0835b4c6aa7b9635cc50a6..b083b422a42ba16d961fc6072f259e907277ab8d 100644
--- a/src/bin/scripts/createlang.sh
+++ b/src/bin/scripts/createlang.sh
@@ -8,7 +8,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.8 2000/03/25 19:10:27 tgl Exp $
+#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.9 2000/05/15 16:12:39 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -103,10 +103,14 @@ do
 		exit 1
 		;;
 	 *)
- 		langname="$1"
-                if [ "$2" ]; then
-                        shift
-			dbname="$1"
+ 		if [ "$list" = 't' ]
+		then	dbname="$1"
+		else	langname="$1"
+                	if [ "$2" ]
+			then
+	                        shift
+				dbname="$1"
+			fi
 		fi
                 ;;
     esac