summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2001-06-01 17:49:17 +0000
committerTom Lane2001-06-01 17:49:17 +0000
commit7c0c9b3ccec4718c1c7cef7b5282fd56b727d965 (patch)
treefe6b73c413c50920a15d9efd65b850e44552b5a1 /src/test
parent597ca67e5eb42521dd41fc385bc10e450b81630d (diff)
New improved version of bpcharin() may have got the truncation case
right, but it failed to get the padding case right. This was obscured by subsequent application of bpchar() in all but one regression test case, and that one didn't fail in an obvious way --- trailing blanks are hard to see. Add another test case to make it more obvious if it breaks again.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/strings.out12
-rw-r--r--src/test/regress/sql/strings.sql2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/test/regress/expected/strings.out b/src/test/regress/expected/strings.out
index 7562a25fdc..42df7c06df 100644
--- a/src/test/regress/expected/strings.out
+++ b/src/test/regress/expected/strings.out
@@ -481,10 +481,16 @@ SELECT text 'text' || ' and unknown' AS "Concat text to unknown type";
text and unknown
(1 row)
+SELECT char(20) 'characters' || 'and text' AS "Concat char to unknown type";
+ Concat char to unknown type
+------------------------------
+ characters and text
+(1 row)
+
SELECT text 'text' || char(20) ' and characters' AS "Concat text to char";
- Concat text to char
----------------------
- text and characters
+ Concat text to char
+--------------------------
+ text and characters
(1 row)
SELECT text 'text' || varchar ' and varchar' AS "Concat text to varchar";
diff --git a/src/test/regress/sql/strings.sql b/src/test/regress/sql/strings.sql
index 56510f83dd..b7f214f4d8 100644
--- a/src/test/regress/sql/strings.sql
+++ b/src/test/regress/sql/strings.sql
@@ -160,6 +160,8 @@ SELECT 'unknown' || ' and unknown' AS "Concat unknown types";
SELECT text 'text' || ' and unknown' AS "Concat text to unknown type";
+SELECT char(20) 'characters' || 'and text' AS "Concat char to unknown type";
+
SELECT text 'text' || char(20) ' and characters' AS "Concat text to char";
SELECT text 'text' || varchar ' and varchar' AS "Concat text to varchar";