+++ /dev/null
-QUERY: SELECT 'char 16 string'::char16 = 'char 16 string'::char16 AS "True";
-True
-----
-t
-(1 row)
-
-QUERY: SELECT 'char 16 string'::char16 = 'char 16 string '::char16 AS "False";
-False
------
-f
-(1 row)
-
-QUERY: CREATE TABLE CHAR16_TBL(f1 char16);
-QUERY: INSERT INTO CHAR16_TBL(f1) VALUES ('ABCDEFGHIJKLMNOP');
-QUERY: INSERT INTO CHAR16_TBL(f1) VALUES ('abcdefghijklmnop');
-QUERY: INSERT INTO CHAR16_TBL(f1) VALUES ('asdfghjkl;');
-QUERY: INSERT INTO CHAR16_TBL(f1) VALUES ('343f%2a');
-QUERY: INSERT INTO CHAR16_TBL(f1) VALUES ('d34aaasdf');
-QUERY: INSERT INTO CHAR16_TBL(f1) VALUES ('');
-QUERY: INSERT INTO CHAR16_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUV');
-QUERY: SELECT '' AS seven, CHAR16_TBL.*;
-seven|f1
------+----------------
- |ABCDEFGHIJKLMNOP
- |abcdefghijklmnop
- |asdfghjkl;
- |343f%2a
- |d34aaasdf
- |
- |1234567890ABCDEF
-(7 rows)
-
-QUERY: SELECT '' AS six, c.f1 FROM CHAR16_TBL c WHERE c.f1 <> 'ABCDEFGHIJKLMNOP';
-six|f1
----+----------------
- |abcdefghijklmnop
- |asdfghjkl;
- |343f%2a
- |d34aaasdf
- |
- |1234567890ABCDEF
-(6 rows)
-
-QUERY: SELECT '' AS one, c.f1 FROM CHAR16_TBL c WHERE c.f1 = 'ABCDEFGHIJKLMNOP';
-one|f1
----+----------------
- |ABCDEFGHIJKLMNOP
-(1 row)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR16_TBL c WHERE c.f1 < 'ABCDEFGHIJKLMNOP';
-three|f1
------+----------------
- |343f%2a
- |
- |1234567890ABCDEF
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR16_TBL c WHERE c.f1 <= 'ABCDEFGHIJKLMNOP';
-four|f1
-----+----------------
- |ABCDEFGHIJKLMNOP
- |343f%2a
- |
- |1234567890ABCDEF
-(4 rows)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR16_TBL c WHERE c.f1 > 'ABCDEFGHIJKLMNOP';
-three|f1
------+----------------
- |abcdefghijklmnop
- |asdfghjkl;
- |d34aaasdf
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR16_TBL c WHERE c.f1 >= 'ABCDEFGHIJKLMNOP';
-four|f1
-----+----------------
- |ABCDEFGHIJKLMNOP
- |abcdefghijklmnop
- |asdfghjkl;
- |d34aaasdf
-(4 rows)
-
-QUERY: SELECT '' AS seven, c.f1 FROM CHAR16_TBL c WHERE c.f1 ~ '.*';
-seven|f1
------+----------------
- |ABCDEFGHIJKLMNOP
- |abcdefghijklmnop
- |asdfghjkl;
- |343f%2a
- |d34aaasdf
- |
- |1234567890ABCDEF
-(7 rows)
-
-QUERY: SELECT '' AS zero, c.f1 FROM CHAR16_TBL c WHERE c.f1 !~ '.*';
-zero|f1
-----+--
-(0 rows)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR16_TBL c WHERE c.f1 ~ '[0-9]';
-three|f1
------+----------------
- |343f%2a
- |d34aaasdf
- |1234567890ABCDEF
-(3 rows)
-
-QUERY: SELECT '' AS two, c.f1 FROM CHAR16_TBL c WHERE c.f1 ~ '.*asdf.*';
-two|f1
----+----------
- |asdfghjkl;
- |d34aaasdf
-(2 rows)
-
-QUERY: DROP TABLE CHAR16_TBL;
+++ /dev/null
-QUERY: CREATE TABLE CHAR2_TBL(f1 char2);
-QUERY: INSERT INTO CHAR2_TBL (f1) VALUES ('AB');
-QUERY: INSERT INTO CHAR2_TBL (f1) VALUES ('ab');
-QUERY: INSERT INTO CHAR2_TBL (f1) VALUES ('ZY');
-QUERY: INSERT INTO CHAR2_TBL (f1) VALUES ('34');
-QUERY: INSERT INTO CHAR2_TBL (f1) VALUES ('d');
-QUERY: INSERT INTO CHAR2_TBL (f1) VALUES ('');
-QUERY: INSERT INTO CHAR2_TBL (f1) VALUES ('12345');
-QUERY: SELECT '' AS seven, CHAR2_TBL.*;
-seven|f1
------+--
- |AB
- |ab
- |ZY
- |34
- |d
- |
- |12
-(7 rows)
-
-QUERY: SELECT '' AS six, c.f1 FROM CHAR2_TBL c WHERE c.f1 <> 'AB';
-six|f1
----+--
- |ab
- |ZY
- |34
- |d
- |
- |12
-(6 rows)
-
-QUERY: SELECT '' AS one, c.f1 FROM CHAR2_TBL c WHERE c.f1 = 'AB';
-one|f1
----+--
- |AB
-(1 row)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR2_TBL c WHERE c.f1 < 'AB';
-three|f1
------+--
- |34
- |
- |12
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR2_TBL c WHERE c.f1 <= 'AB';
-four|f1
-----+--
- |AB
- |34
- |
- |12
-(4 rows)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR2_TBL c WHERE c.f1 > 'AB';
-three|f1
------+--
- |ab
- |ZY
- |d
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR2_TBL c WHERE c.f1 >= 'AB';
-four|f1
-----+--
- |AB
- |ab
- |ZY
- |d
-(4 rows)
-
-QUERY: SELECT '' AS seven, c.f1 FROM CHAR2_TBL c WHERE c.f1 ~ '.*';
-seven|f1
------+--
- |AB
- |ab
- |ZY
- |34
- |d
- |
- |12
-(7 rows)
-
-QUERY: SELECT '' AS zero, c.f1 FROM CHAR2_TBL c WHERE c.f1 !~ '.*';
-zero|f1
-----+--
-(0 rows)
-
-QUERY: SELECT '' AS one, c.f1 FROM CHAR2_TBL c WHERE c.f1 ~ '34';
-one|f1
----+--
- |34
-(1 row)
-
-QUERY: SELECT '' AS one, c.f1 FROM CHAR2_TBL c WHERE c.f1 ~ '3.*';
-one|f1
----+--
- |34
-(1 row)
-
-QUERY: DROP TABLE CHAR2_TBL;
+++ /dev/null
-QUERY: CREATE TABLE CHAR4_TBL (f1 char4);
-QUERY: INSERT INTO CHAR4_TBL(f1) VALUES ('ABCD');
-QUERY: INSERT INTO CHAR4_TBL(f1) VALUES ('abcd');
-QUERY: INSERT INTO CHAR4_TBL(f1) VALUES ('ZYWZ');
-QUERY: INSERT INTO CHAR4_TBL(f1) VALUES ('343f');
-QUERY: INSERT INTO CHAR4_TBL(f1) VALUES ('d34a');
-QUERY: INSERT INTO CHAR4_TBL(f1) VALUES ('');
-QUERY: INSERT INTO CHAR4_TBL(f1) VALUES ('12345678');
-QUERY: SELECT '' AS seven, CHAR4_TBL.*;
-seven|f1
------+----
- |ABCD
- |abcd
- |ZYWZ
- |343f
- |d34a
- |
- |1234
-(7 rows)
-
-QUERY: SELECT '' AS six, c.f1 FROM CHAR4_TBL c WHERE c.f1 <> 'ABCD';
-six|f1
----+----
- |abcd
- |ZYWZ
- |343f
- |d34a
- |
- |1234
-(6 rows)
-
-QUERY: SELECT '' AS one, c.f1 FROM CHAR4_TBL c WHERE c.f1 = 'ABCD';
-one|f1
----+----
- |ABCD
-(1 row)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR4_TBL c WHERE c.f1 < 'ABCD';
-three|f1
------+----
- |343f
- |
- |1234
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR4_TBL c WHERE c.f1 <= 'ABCD';
-four|f1
-----+----
- |ABCD
- |343f
- |
- |1234
-(4 rows)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR4_TBL c WHERE c.f1 > 'ABCD';
-three|f1
------+----
- |abcd
- |ZYWZ
- |d34a
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR4_TBL c WHERE c.f1 >= 'ABCD';
-four|f1
-----+----
- |ABCD
- |abcd
- |ZYWZ
- |d34a
-(4 rows)
-
-QUERY: SELECT '' AS seven, c.f1 FROM CHAR4_TBL c WHERE c.f1 ~ '.*';
-seven|f1
------+----
- |ABCD
- |abcd
- |ZYWZ
- |343f
- |d34a
- |
- |1234
-(7 rows)
-
-QUERY: SELECT '' AS zero, c.f1 FROM CHAR4_TBL c WHERE c.f1 !~ '.*';
-zero|f1
-----+--
-(0 rows)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR4_TBL c WHERE c.f1 ~ '.*34.*';
-three|f1
------+----
- |343f
- |d34a
- |1234
-(3 rows)
-
-QUERY: DROP TABLE CHAR4_TBL;
+++ /dev/null
-QUERY: CREATE TABLE CHAR8_TBL(f1 char8);
-QUERY: INSERT INTO CHAR8_TBL(f1) VALUES ('ABCDEFGH');
-QUERY: INSERT INTO CHAR8_TBL(f1) VALUES ('abcdefgh');
-QUERY: INSERT INTO CHAR8_TBL(f1) VALUES ('ZYWZ410-');
-QUERY: INSERT INTO CHAR8_TBL(f1) VALUES ('343f%2a');
-QUERY: INSERT INTO CHAR8_TBL(f1) VALUES ('d34aas');
-QUERY: INSERT INTO CHAR8_TBL(f1) VALUES ('');
-QUERY: INSERT INTO CHAR8_TBL(f1) VALUES ('1234567890');
-QUERY: SELECT '' AS seven, CHAR8_TBL.*;
-seven|f1
------+--------
- |ABCDEFGH
- |abcdefgh
- |ZYWZ410-
- |343f%2a
- |d34aas
- |
- |12345678
-(7 rows)
-
-QUERY: SELECT '' AS six, c.f1 FROM CHAR8_TBL c WHERE c.f1 <> 'ABCDEFGH';
-six|f1
----+--------
- |abcdefgh
- |ZYWZ410-
- |343f%2a
- |d34aas
- |
- |12345678
-(6 rows)
-
-QUERY: SELECT '' AS one, c.f1 FROM CHAR8_TBL c WHERE c.f1 = 'ABCDEFGH';
-one|f1
----+--------
- |ABCDEFGH
-(1 row)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR8_TBL c WHERE c.f1 < 'ABCDEFGH';
-three|f1
------+--------
- |343f%2a
- |
- |12345678
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR8_TBL c WHERE c.f1 <= 'ABCDEFGH';
-four|f1
-----+--------
- |ABCDEFGH
- |343f%2a
- |
- |12345678
-(4 rows)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR8_TBL c WHERE c.f1 > 'ABCDEFGH';
-three|f1
------+--------
- |abcdefgh
- |ZYWZ410-
- |d34aas
-(3 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR8_TBL c WHERE c.f1 >= 'ABCDEFGH';
-four|f1
-----+--------
- |ABCDEFGH
- |abcdefgh
- |ZYWZ410-
- |d34aas
-(4 rows)
-
-QUERY: SELECT '' AS seven, c.f1 FROM CHAR8_TBL c WHERE c.f1 ~ '.*';
-seven|f1
------+--------
- |ABCDEFGH
- |abcdefgh
- |ZYWZ410-
- |343f%2a
- |d34aas
- |
- |12345678
-(7 rows)
-
-QUERY: SELECT '' AS zero, c.f1 FROM CHAR8_TBL c WHERE c.f1 !~ '.*';
-zero|f1
-----+--
-(0 rows)
-
-QUERY: SELECT '' AS four, c.f1 FROM CHAR8_TBL c WHERE c.f1 ~ '[0-9]';
-four|f1
-----+--------
- |ZYWZ410-
- |343f%2a
- |d34aas
- |12345678
-(4 rows)
-
-QUERY: SELECT '' AS three, c.f1 FROM CHAR8_TBL c WHERE c.f1 ~ '.*34.*';
-three|f1
------+--------
- |343f%2a
- |d34aas
- |12345678
-(3 rows)
-
-QUERY: DROP TABLE CHAR8_TBL;
+++ /dev/null
---**************** testing built-in type char16 **************
---
--- all inputs are silently truncated at 16 characters
---
-
--- fixed-length by reference
-SELECT 'char 16 string'::char16 = 'char 16 string'::char16 AS "True";
-
-SELECT 'char 16 string'::char16 = 'char 16 string '::char16 AS "False";
-
---
---
---
-
-CREATE TABLE CHAR16_TBL(f1 char16);
-
-INSERT INTO CHAR16_TBL(f1) VALUES ('ABCDEFGHIJKLMNOP');
-
-INSERT INTO CHAR16_TBL(f1) VALUES ('abcdefghijklmnop');
-
-INSERT INTO CHAR16_TBL(f1) VALUES ('asdfghjkl;');
-
-INSERT INTO CHAR16_TBL(f1) VALUES ('343f%2a');
-
-INSERT INTO CHAR16_TBL(f1) VALUES ('d34aaasdf');
-
-INSERT INTO CHAR16_TBL(f1) VALUES ('');
-
-INSERT INTO CHAR16_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUV');
-
-
-SELECT '' AS seven, CHAR16_TBL.*;
-
-SELECT '' AS six, c.f1 FROM CHAR16_TBL c WHERE c.f1 <> 'ABCDEFGHIJKLMNOP';
-
-SELECT '' AS one, c.f1 FROM CHAR16_TBL c WHERE c.f1 = 'ABCDEFGHIJKLMNOP';
-
-SELECT '' AS three, c.f1 FROM CHAR16_TBL c WHERE c.f1 < 'ABCDEFGHIJKLMNOP';
-
-SELECT '' AS four, c.f1 FROM CHAR16_TBL c WHERE c.f1 <= 'ABCDEFGHIJKLMNOP';
-
-SELECT '' AS three, c.f1 FROM CHAR16_TBL c WHERE c.f1 > 'ABCDEFGHIJKLMNOP';
-
-SELECT '' AS four, c.f1 FROM CHAR16_TBL c WHERE c.f1 >= 'ABCDEFGHIJKLMNOP';
-
-SELECT '' AS seven, c.f1 FROM CHAR16_TBL c WHERE c.f1 ~ '.*';
-
-SELECT '' AS zero, c.f1 FROM CHAR16_TBL c WHERE c.f1 !~ '.*';
-
-SELECT '' AS three, c.f1 FROM CHAR16_TBL c WHERE c.f1 ~ '[0-9]';
-
-SELECT '' AS two, c.f1 FROM CHAR16_TBL c WHERE c.f1 ~ '.*asdf.*';
-
-DROP TABLE CHAR16_TBL;
+++ /dev/null
--- **************** testing built-in type char2 **************
---
--- all inputs are silently truncated at 2 characters
---
-
-CREATE TABLE CHAR2_TBL(f1 char2);
-
-INSERT INTO CHAR2_TBL (f1) VALUES ('AB');
-
-INSERT INTO CHAR2_TBL (f1) VALUES ('ab');
-
-INSERT INTO CHAR2_TBL (f1) VALUES ('ZY');
-
-INSERT INTO CHAR2_TBL (f1) VALUES ('34');
-
-INSERT INTO CHAR2_TBL (f1) VALUES ('d');
-
-INSERT INTO CHAR2_TBL (f1) VALUES ('');
-
-INSERT INTO CHAR2_TBL (f1) VALUES ('12345');
-
-
-SELECT '' AS seven, CHAR2_TBL.*;
-
-SELECT '' AS six, c.f1 FROM CHAR2_TBL c WHERE c.f1 <> 'AB';
-
-SELECT '' AS one, c.f1 FROM CHAR2_TBL c WHERE c.f1 = 'AB';
-
-SELECT '' AS three, c.f1 FROM CHAR2_TBL c WHERE c.f1 < 'AB';
-
-SELECT '' AS four, c.f1 FROM CHAR2_TBL c WHERE c.f1 <= 'AB';
-
-SELECT '' AS three, c.f1 FROM CHAR2_TBL c WHERE c.f1 > 'AB';
-
-SELECT '' AS four, c.f1 FROM CHAR2_TBL c WHERE c.f1 >= 'AB';
-
-SELECT '' AS seven, c.f1 FROM CHAR2_TBL c WHERE c.f1 ~ '.*';
-
-SELECT '' AS zero, c.f1 FROM CHAR2_TBL c WHERE c.f1 !~ '.*';
-
-SELECT '' AS one, c.f1 FROM CHAR2_TBL c WHERE c.f1 ~ '34';
-
-SELECT '' AS one, c.f1 FROM CHAR2_TBL c WHERE c.f1 ~ '3.*';
-
-DROP TABLE CHAR2_TBL;
+++ /dev/null
---**************** testing built-in type char4 **************
---
--- all inputs are silently truncated at 4 characters
---
-
-CREATE TABLE CHAR4_TBL (f1 char4);
-
-INSERT INTO CHAR4_TBL(f1) VALUES ('ABCD');
-
-INSERT INTO CHAR4_TBL(f1) VALUES ('abcd');
-
-INSERT INTO CHAR4_TBL(f1) VALUES ('ZYWZ');
-
-INSERT INTO CHAR4_TBL(f1) VALUES ('343f');
-
-INSERT INTO CHAR4_TBL(f1) VALUES ('d34a');
-
-INSERT INTO CHAR4_TBL(f1) VALUES ('');
-
-INSERT INTO CHAR4_TBL(f1) VALUES ('12345678');
-
-
-SELECT '' AS seven, CHAR4_TBL.*;
-
-SELECT '' AS six, c.f1 FROM CHAR4_TBL c WHERE c.f1 <> 'ABCD';
-
-SELECT '' AS one, c.f1 FROM CHAR4_TBL c WHERE c.f1 = 'ABCD';
-
-SELECT '' AS three, c.f1 FROM CHAR4_TBL c WHERE c.f1 < 'ABCD';
-
-SELECT '' AS four, c.f1 FROM CHAR4_TBL c WHERE c.f1 <= 'ABCD';
-
-SELECT '' AS three, c.f1 FROM CHAR4_TBL c WHERE c.f1 > 'ABCD';
-
-SELECT '' AS four, c.f1 FROM CHAR4_TBL c WHERE c.f1 >= 'ABCD';
-
-SELECT '' AS seven, c.f1 FROM CHAR4_TBL c WHERE c.f1 ~ '.*';
-
-SELECT '' AS zero, c.f1 FROM CHAR4_TBL c WHERE c.f1 !~ '.*';
-
-SELECT '' AS three, c.f1 FROM CHAR4_TBL c WHERE c.f1 ~ '.*34.*';
-
-DROP TABLE CHAR4_TBL;
+++ /dev/null
--- **************** testing built-in type char8 **************
---
--- all inputs are silently truncated at 8 characters
---
-
-CREATE TABLE CHAR8_TBL(f1 char8);
-
-INSERT INTO CHAR8_TBL(f1) VALUES ('ABCDEFGH');
-
-INSERT INTO CHAR8_TBL(f1) VALUES ('abcdefgh');
-
-INSERT INTO CHAR8_TBL(f1) VALUES ('ZYWZ410-');
-
-INSERT INTO CHAR8_TBL(f1) VALUES ('343f%2a');
-
-INSERT INTO CHAR8_TBL(f1) VALUES ('d34aas');
-
-INSERT INTO CHAR8_TBL(f1) VALUES ('');
-
-INSERT INTO CHAR8_TBL(f1) VALUES ('1234567890');
-
-
-SELECT '' AS seven, CHAR8_TBL.*;
-
-SELECT '' AS six, c.f1 FROM CHAR8_TBL c WHERE c.f1 <> 'ABCDEFGH';
-
-SELECT '' AS one, c.f1 FROM CHAR8_TBL c WHERE c.f1 = 'ABCDEFGH';
-
-SELECT '' AS three, c.f1 FROM CHAR8_TBL c WHERE c.f1 < 'ABCDEFGH';
-
-SELECT '' AS four, c.f1 FROM CHAR8_TBL c WHERE c.f1 <= 'ABCDEFGH';
-
-SELECT '' AS three, c.f1 FROM CHAR8_TBL c WHERE c.f1 > 'ABCDEFGH';
-
-SELECT '' AS four, c.f1 FROM CHAR8_TBL c WHERE c.f1 >= 'ABCDEFGH';
-
-SELECT '' AS seven, c.f1 FROM CHAR8_TBL c WHERE c.f1 ~ '.*';
-
-SELECT '' AS zero, c.f1 FROM CHAR8_TBL c WHERE c.f1 !~ '.*';
-
-SELECT '' AS four, c.f1 FROM CHAR8_TBL c WHERE c.f1 ~ '[0-9]';
-
-SELECT '' AS three, c.f1 FROM CHAR8_TBL c WHERE c.f1 ~ '.*34.*';
-
-DROP TABLE CHAR8_TBL;