diff --git a/src/test/regress/expected/boolean.out b/src/test/regress/expected/boolean.out
index e66f33702bc4e720a421df6e11fff796b58ab5dc..a3629f228272a2a1a70b2c984f1c4d65994be777 100644
--- a/src/test/regress/expected/boolean.out
+++ b/src/test/regress/expected/boolean.out
@@ -11,7 +11,19 @@ SELECT 1 AS one;
 (1 row)
 
 -- ******************testing built-in type bool********************
--- check bool type-casting as well as and, or, not in qualifications--
+-- check bool input syntax
+SELECT true AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT false AS false;
+ false 
+-------
+ f
+(1 row)
+
 SELECT bool 't' AS true;
  true 
 ------
@@ -24,6 +36,83 @@ SELECT bool '   f           ' AS false;
  f
 (1 row)
 
+SELECT bool 'true' AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT bool 'test' AS error;
+ERROR:  invalid input syntax for type boolean: "test"
+LINE 1: SELECT bool 'test' AS error;
+                    ^
+SELECT bool 'false' AS false;
+ false 
+-------
+ f
+(1 row)
+
+SELECT bool 'foo' AS error;
+ERROR:  invalid input syntax for type boolean: "foo"
+LINE 1: SELECT bool 'foo' AS error;
+                    ^
+SELECT bool 'y' AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT bool 'yes' AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT bool 'yeah' AS error;
+ERROR:  invalid input syntax for type boolean: "yeah"
+LINE 1: SELECT bool 'yeah' AS error;
+                    ^
+SELECT bool 'n' AS false;
+ false 
+-------
+ f
+(1 row)
+
+SELECT bool 'no' AS false;
+ false 
+-------
+ f
+(1 row)
+
+SELECT bool 'nay' AS error;
+ERROR:  invalid input syntax for type boolean: "nay"
+LINE 1: SELECT bool 'nay' AS error;
+                    ^
+SELECT bool '1' AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT bool '11' AS error;
+ERROR:  invalid input syntax for type boolean: "11"
+LINE 1: SELECT bool '11' AS error;
+                    ^
+SELECT bool '0' AS false;
+ false 
+-------
+ f
+(1 row)
+
+SELECT bool '000' AS error;
+ERROR:  invalid input syntax for type boolean: "000"
+LINE 1: SELECT bool '000' AS error;
+                    ^
+SELECT bool '' AS error;
+ERROR:  invalid input syntax for type boolean: ""
+LINE 1: SELECT bool '' AS error;
+                    ^
+-- and, or, not in qualifications
 SELECT bool 't' or bool 'f' AS true;
  true 
 ------
@@ -54,6 +143,30 @@ SELECT bool 't' <> bool 'f' AS true;
  t
 (1 row)
 
+SELECT bool 't' > bool 'f' AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT bool 't' >= bool 'f' AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT bool 'f' < bool 't' AS true;
+ true 
+------
+ t
+(1 row)
+
+SELECT bool 'f' <= bool 't' AS true;
+ true 
+------
+ t
+(1 row)
+
 -- explicit casts to/from text
 SELECT 'TrUe'::text::boolean AS true, 'fAlse'::text::boolean AS false;
  true | false 
diff --git a/src/test/regress/sql/boolean.sql b/src/test/regress/sql/boolean.sql
index c68f02e7a5a8252927f4bb20f716a964eeb90fe7..63dd22f8771c292ce30cde12d9fb9a19a7108cf3 100644
--- a/src/test/regress/sql/boolean.sql
+++ b/src/test/regress/sql/boolean.sql
@@ -10,12 +10,48 @@ SELECT 1 AS one;
 
 -- ******************testing built-in type bool********************
 
--- check bool type-casting as well as and, or, not in qualifications--
+-- check bool input syntax
+
+SELECT true AS true;
+
+SELECT false AS false;
 
 SELECT bool 't' AS true;
 
 SELECT bool '   f           ' AS false;
 
+SELECT bool 'true' AS true;
+
+SELECT bool 'test' AS error;
+
+SELECT bool 'false' AS false;
+
+SELECT bool 'foo' AS error;
+
+SELECT bool 'y' AS true;
+
+SELECT bool 'yes' AS true;
+
+SELECT bool 'yeah' AS error;
+
+SELECT bool 'n' AS false;
+
+SELECT bool 'no' AS false;
+
+SELECT bool 'nay' AS error;
+
+SELECT bool '1' AS true;
+
+SELECT bool '11' AS error;
+
+SELECT bool '0' AS false;
+
+SELECT bool '000' AS error;
+
+SELECT bool '' AS error;
+
+-- and, or, not in qualifications
+
 SELECT bool 't' or bool 'f' AS true;
 
 SELECT bool 't' and bool 'f' AS false;
@@ -26,6 +62,14 @@ SELECT bool 't' = bool 'f' AS false;
 
 SELECT bool 't' <> bool 'f' AS true;
 
+SELECT bool 't' > bool 'f' AS true;
+
+SELECT bool 't' >= bool 'f' AS true;
+
+SELECT bool 'f' < bool 't' AS true;
+
+SELECT bool 'f' <= bool 't' AS true;
+
 -- explicit casts to/from text
 SELECT 'TrUe'::text::boolean AS true, 'fAlse'::text::boolean AS false;
 SELECT '    true   '::text::boolean AS true,