diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/bit.out | 17 | ||||
-rw-r--r-- | src/test/regress/sql/bit.sql | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/regress/expected/bit.out b/src/test/regress/expected/bit.out index 98c26550396..e17cbf42ca2 100644 --- a/src/test/regress/expected/bit.out +++ b/src/test/regress/expected/bit.out @@ -40,6 +40,23 @@ SELECT * FROM VARBIT_TABLE; 01010101010 (4 rows) +-- Literals with syntax errors +SELECT b' 0'; +ERROR: " " is not a valid binary digit +LINE 1: SELECT b' 0'; + ^ +SELECT b'0 '; +ERROR: " " is not a valid binary digit +LINE 1: SELECT b'0 '; + ^ +SELECT x' 0'; +ERROR: " " is not a valid hexadecimal digit +LINE 1: SELECT x' 0'; + ^ +SELECT x'0 '; +ERROR: " " is not a valid hexadecimal digit +LINE 1: SELECT x'0 '; + ^ -- Concatenation SELECT v, b, (v || b) AS concat FROM BIT_TABLE, VARBIT_TABLE diff --git a/src/test/regress/sql/bit.sql b/src/test/regress/sql/bit.sql index 2cd550d27eb..34230b99fba 100644 --- a/src/test/regress/sql/bit.sql +++ b/src/test/regress/sql/bit.sql @@ -29,6 +29,11 @@ INSERT INTO VARBIT_TABLE VALUES (B'101011111010'); -- too long --INSERT INTO VARBIT_TABLE VALUES ('X555'); SELECT * FROM VARBIT_TABLE; +-- Literals with syntax errors +SELECT b' 0'; +SELECT b'0 '; +SELECT x' 0'; +SELECT x'0 '; -- Concatenation SELECT v, b, (v || b) AS concat |