diff options
| author | Bruce Momjian | 1998-04-07 18:14:38 +0000 |
|---|---|---|
| committer | Bruce Momjian | 1998-04-07 18:14:38 +0000 |
| commit | db21523314fa5bbce7b6713469192dbf74533e25 (patch) | |
| tree | 0ef66b02de60ad9e30e3094925108e195067d9b0 /src/test/regress | |
| parent | 6a3c751448980d29e7a8ed723adced303250fd12 (diff) | |
Back out char2-char16 removal. Add later.
Diffstat (limited to 'src/test/regress')
28 files changed, 194 insertions, 361 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 0d218eec6a8..9da80caf97d 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -1,6 +1,6 @@ QUERY: CREATE TABLE temp (initial int4); QUERY: ALTER TABLE temp ADD COLUMN a int4; -QUERY: ALTER TABLE temp ADD COLUMN b name; +QUERY: ALTER TABLE temp ADD COLUMN b char16; QUERY: ALTER TABLE temp ADD COLUMN c text; QUERY: ALTER TABLE temp ADD COLUMN d float8; QUERY: ALTER TABLE temp ADD COLUMN e float4; @@ -27,12 +27,12 @@ QUERY: ALTER TABLE temp ADD COLUMN y float4[]; QUERY: ALTER TABLE temp ADD COLUMN z int2[]; QUERY: INSERT INTO temp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z) - VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', + VALUES (4, 'char16', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', 314159, '(1,1)', 512, '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["current" "infinity"]', - '1/3', '1,name', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); + '1/3', '1,char16', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); ERROR: Relation temp does not have attribute k QUERY: SELECT * FROM temp; initial|a|b|c|d|e|f|g|h|i|j|l|m|n|p|q|r|s|t|u|v|w|x|y|z @@ -44,7 +44,7 @@ QUERY: CREATE TABLE temp ( initial int4 ); QUERY: ALTER TABLE temp ADD COLUMN a int4; -QUERY: ALTER TABLE temp ADD COLUMN b name; +QUERY: ALTER TABLE temp ADD COLUMN b char16; QUERY: ALTER TABLE temp ADD COLUMN c text; QUERY: ALTER TABLE temp ADD COLUMN d float8; QUERY: ALTER TABLE temp ADD COLUMN e float4; @@ -71,12 +71,12 @@ QUERY: ALTER TABLE temp ADD COLUMN y float4[]; QUERY: ALTER TABLE temp ADD COLUMN z int2[]; QUERY: INSERT INTO temp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z) - VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', + VALUES (4, 'char16', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', 314159, '(1,1)', 512, '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["current" "infinity"]', - '1/3', '1,name', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); + '1/3', '1,char16', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); ERROR: Relation temp does not have attribute k QUERY: SELECT * FROM temp; initial|a|b|c|d|e|f|g|h|i|j|l|m|n|p|q|r|s|t|u|v|w|x|y|z diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 92cfc94d213..b593c212cb3 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -42,7 +42,7 @@ x QUERY: SELECT * FROM arrtest WHERE arrtest.a[1] < 5 and - arrtest.c = '{"foobar"}'::_name; + arrtest.c = '{"foobar"}'::_char16; a|b|c|d|e -+-+-+-+- (0 rows) diff --git a/src/test/regress/expected/btree_index.out b/src/test/regress/expected/btree_index.out index fae68fd164d..97386feb518 100644 --- a/src/test/regress/expected/btree_index.out +++ b/src/test/regress/expected/btree_index.out @@ -23,24 +23,24 @@ seqno| random (1 row) QUERY: SELECT b.* - FROM bt_name_heap b - WHERE b.seqno < '1'::name; + FROM bt_c16_heap b + WHERE b.seqno < '1'::char16; seqno| random -----+---------- 0|1935401906 (1 row) QUERY: SELECT b.* - FROM bt_name_heap b - WHERE b.seqno >= '9999'::name; + FROM bt_c16_heap b + WHERE b.seqno >= '9999'::char16; seqno| random -----+---------- 9999|1227676208 (1 row) QUERY: SELECT b.* - FROM bt_name_heap b - WHERE b.seqno = '4500'::name; + FROM bt_c16_heap b + WHERE b.seqno = '4500'::char16; seqno| random -----+---------- 4500|2080851358 diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out index 69535a52a0e..d09a4e4d757 100644 --- a/src/test/regress/expected/create_index.out +++ b/src/test/regress/expected/create_index.out @@ -1,7 +1,7 @@ QUERY: CREATE INDEX onek_unique1 ON onek USING btree(unique1 int4_ops); QUERY: CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops); QUERY: CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops); -QUERY: CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops); +QUERY: CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 char16_ops); QUERY: CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops); QUERY: CREATE INDEX tenk1_unique2 ON tenk1 USING btree(unique2 int4_ops); QUERY: CREATE INDEX tenk1_hundred ON tenk1 USING btree(hundred int4_ops); @@ -12,11 +12,11 @@ QUERY: CREATE INDEX rix ON road USING btree (name text_ops); QUERY: CREATE INDEX iix ON ihighway USING btree (name text_ops); QUERY: CREATE INDEX six ON shighway USING btree (name text_ops); QUERY: CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops); -QUERY: CREATE INDEX bt_name_index ON bt_name_heap USING btree (seqno name_ops); +QUERY: CREATE INDEX bt_c16_index ON bt_c16_heap USING btree (seqno char16_ops); QUERY: CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops); QUERY: CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops); QUERY: CREATE INDEX rect2ind ON fast_emp4000 USING rtree (home_base bigbox_ops); QUERY: CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops); -QUERY: CREATE INDEX hash_name_index ON hash_name_heap USING hash (random name_ops); +QUERY: CREATE INDEX hash_c16_index ON hash_c16_heap USING hash (random char16_ops); QUERY: CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops); QUERY: CREATE INDEX hash_f8_index ON hash_f8_heap USING hash (random float8_ops); diff --git a/src/test/regress/expected/create_misc.out b/src/test/regress/expected/create_misc.out index 3382c856697..bfa7daacddb 100644 --- a/src/test/regress/expected/create_misc.out +++ b/src/test/regress/expected/create_misc.out @@ -39,77 +39,77 @@ QUERY: INSERT INTO b_star (class, a, b) VALUES ('b', 3, 'mumble'::text); QUERY: INSERT INTO b_star (class, a) VALUES ('b', 4); QUERY: INSERT INTO b_star (class, b) VALUES ('b', 'bumble'::text); QUERY: INSERT INTO b_star (class) VALUES ('b'); -QUERY: INSERT INTO c_star (class, a, c) VALUES ('c', 5, 'hi mom'::name); +QUERY: INSERT INTO c_star (class, a, c) VALUES ('c', 5, 'hi mom'::char16); QUERY: INSERT INTO c_star (class, a) VALUES ('c', 6); -QUERY: INSERT INTO c_star (class, c) VALUES ('c', 'hi paul'::name); +QUERY: INSERT INTO c_star (class, c) VALUES ('c', 'hi paul'::char16); QUERY: INSERT INTO c_star (class) VALUES ('c'); QUERY: INSERT INTO d_star (class, a, b, c, d) - VALUES ('d', 7, 'grumble'::text, 'hi sunita'::name, '0.0'::float8); + VALUES ('d', 7, 'grumble'::text, 'hi sunita'::char16, '0.0'::float8); QUERY: INSERT INTO d_star (class, a, b, c) - VALUES ('d', 8, 'stumble'::text, 'hi koko'::name); + VALUES ('d', 8, 'stumble'::text, 'hi koko'::char16); QUERY: INSERT INTO d_star (class, a, b, d) VALUES ('d', 9, 'rumble'::text, '1.1'::float8); QUERY: INSERT INTO d_star (class, a, c, d) - VALUES ('d', 10, 'hi kristin'::name, '10.01'::float8); + VALUES ('d', 10, 'hi kristin'::char16, '10.01'::float8); QUERY: INSERT INTO d_star (class, b, c, d) - VALUES ('d', 'crumble'::text, 'hi boris'::name, '100.001'::float8); + VALUES ('d', 'crumble'::text, 'hi boris'::char16, '100.001'::float8); QUERY: INSERT INTO d_star (class, a, b) VALUES ('d', 11, 'fumble'::text); QUERY: INSERT INTO d_star (class, a, c) - VALUES ('d', 12, 'hi avi'::name); + VALUES ('d', 12, 'hi avi'::char16); QUERY: INSERT INTO d_star (class, a, d) VALUES ('d', 13, '1000.0001'::float8); QUERY: INSERT INTO d_star (class, b, c) - VALUES ('d', 'tumble'::text, 'hi andrew'::name); + VALUES ('d', 'tumble'::text, 'hi andrew'::char16); QUERY: INSERT INTO d_star (class, b, d) VALUES ('d', 'humble'::text, '10000.00001'::float8); QUERY: INSERT INTO d_star (class, c, d) - VALUES ('d', 'hi ginger'::name, '100000.000001'::float8); + VALUES ('d', 'hi ginger'::char16, '100000.000001'::float8); QUERY: INSERT INTO d_star (class, a) VALUES ('d', 14); QUERY: INSERT INTO d_star (class, b) VALUES ('d', 'jumble'::text); -QUERY: INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::name); +QUERY: INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::char16); QUERY: INSERT INTO d_star (class, d) VALUES ('d', '1000000.0000001'::float8); QUERY: INSERT INTO d_star (class) VALUES ('d'); QUERY: INSERT INTO e_star (class, a, c, e) - VALUES ('e', 15, 'hi carol'::name, '-1'::int2); + VALUES ('e', 15, 'hi carol'::char16, '-1'::int2); QUERY: INSERT INTO e_star (class, a, c) - VALUES ('e', 16, 'hi bob'::name); + VALUES ('e', 16, 'hi bob'::char16); QUERY: INSERT INTO e_star (class, a, e) VALUES ('e', 17, '-2'::int2); QUERY: INSERT INTO e_star (class, c, e) - VALUES ('e', 'hi michelle'::name, '-3'::int2); + VALUES ('e', 'hi michelle'::char16, '-3'::int2); QUERY: INSERT INTO e_star (class, a) VALUES ('e', 18); QUERY: INSERT INTO e_star (class, c) - VALUES ('e', 'hi elisa'::name); + VALUES ('e', 'hi elisa'::char16); QUERY: INSERT INTO e_star (class, e) VALUES ('e', '-4'::int2); QUERY: INSERT INTO f_star (class, a, c, e, f) - VALUES ('f', 19, 'hi claire'::name, '-5'::int2, '(1,3),(2,4)'::polygon); + VALUES ('f', 19, 'hi claire'::char16, '-5'::int2, '(1,3),(2,4)'::polygon); QUERY: INSERT INTO f_star (class, a, c, e) - VALUES ('f', 20, 'hi mike'::name, '-6'::int2); + VALUES ('f', 20, 'hi mike'::char16, '-6'::int2); QUERY: INSERT INTO f_star (class, a, c, f) - VALUES ('f', 21, 'hi marcel'::name, '(11,44),(22,55),(33,66)'::polygon); + VALUES ('f', 21, 'hi marcel'::char16, '(11,44),(22,55),(33,66)'::polygon); QUERY: INSERT INTO f_star (class, a, e, f) VALUES ('f', 22, '-7'::int2, '(111,555),(222,666),(333,777),(444,888)'::polygon); QUERY: INSERT INTO f_star (class, c, e, f) - VALUES ('f', 'hi keith'::name, '-8'::int2, + VALUES ('f', 'hi keith'::char16, '-8'::int2, '(1111,3333),(2222,4444)'::polygon); QUERY: INSERT INTO f_star (class, a, c) - VALUES ('f', 24, 'hi marc'::name); + VALUES ('f', 24, 'hi marc'::char16); QUERY: INSERT INTO f_star (class, a, e) VALUES ('f', 25, '-9'::int2); QUERY: INSERT INTO f_star (class, a, f) VALUES ('f', 26, '(11111,33333),(22222,44444)'::polygon); QUERY: INSERT INTO f_star (class, c, e) - VALUES ('f', 'hi allison'::name, '-10'::int2); + VALUES ('f', 'hi allison'::char16, '-10'::int2); QUERY: INSERT INTO f_star (class, c, f) - VALUES ('f', 'hi jeff'::name, + VALUES ('f', 'hi jeff'::char16, '(111111,333333),(222222,444444)'::polygon); QUERY: INSERT INTO f_star (class, e, f) VALUES ('f', '-11'::int2, '(1111111,3333333),(2222222,4444444)'::polygon); QUERY: INSERT INTO f_star (class, a) VALUES ('f', 27); -QUERY: INSERT INTO f_star (class, c) VALUES ('f', 'hi carl'::name); +QUERY: INSERT INTO f_star (class, c) VALUES ('f', 'hi carl'::char16); QUERY: INSERT INTO f_star (class, e) VALUES ('f', '-12'::int2); QUERY: INSERT INTO f_star (class, f) VALUES ('f', '(11111111,33333333),(22222222,44444444)'::polygon); diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out index 7f3859da5d0..2cc1099bed1 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -20,9 +20,9 @@ QUERY: CREATE TABLE onek ( tenthous int4, odd int4, even int4, - stringu1 name, - stringu2 name, - string4 name + stringu1 char16, + stringu2 char16, + string4 char16 ); QUERY: CREATE TABLE tenk1 ( unique1 int4, @@ -38,9 +38,9 @@ QUERY: CREATE TABLE tenk1 ( tenthous int4, odd int4, even int4, - stringu1 name, - stringu2 name, - string4 name + stringu1 char16, + stringu2 char16, + string4 char16 ); QUERY: CREATE TABLE tenk2 ( unique1 int4, @@ -56,9 +56,9 @@ QUERY: CREATE TABLE tenk2 ( tenthous int4, odd int4, even int4, - stringu1 name, - stringu2 name, - string4 name + stringu1 char16, + stringu2 char16, + string4 char16 ); QUERY: CREATE TABLE person ( name text, @@ -67,7 +67,7 @@ QUERY: CREATE TABLE person ( ); QUERY: CREATE TABLE emp ( salary int4, - manager name + manager char16 ) INHERITS (person); QUERY: CREATE TABLE student ( gpa float8 @@ -76,12 +76,12 @@ QUERY: CREATE TABLE stud_emp ( percent int4 ) INHERITS (emp, student); QUERY: CREATE TABLE city ( - name name, + name char16, location box, budget city_budget ); QUERY: CREATE TABLE dept ( - dname name, + dname char16, mgrname text ); QUERY: CREATE TABLE slow_emp4000 ( @@ -111,7 +111,7 @@ QUERY: CREATE TABLE b_star ( b text ) INHERITS (a_star); QUERY: CREATE TABLE c_star ( - c name + c char16 ) INHERITS (a_star); QUERY: CREATE TABLE d_star ( d float8 @@ -129,7 +129,7 @@ QUERY: CREATE TABLE aggtest ( QUERY: CREATE TABLE arrtest ( a int2[], b int4[][][], - c name[], + c char16[], d text[][], e float8[] ); @@ -137,9 +137,9 @@ QUERY: CREATE TABLE hash_i4_heap ( seqno int4, random int4 ); -QUERY: CREATE TABLE hash_name_heap ( +QUERY: CREATE TABLE hash_c16_heap ( seqno int4, - random name + random char16 ); QUERY: CREATE TABLE hash_txt_heap ( seqno int4, @@ -153,8 +153,8 @@ QUERY: CREATE TABLE bt_i4_heap ( seqno int4, random int4 ); -QUERY: CREATE TABLE bt_name_heap ( - seqno name, +QUERY: CREATE TABLE bt_c16_heap ( + seqno char16, random int4 ); QUERY: CREATE TABLE bt_txt_heap ( diff --git a/src/test/regress/expected/hash_index.out b/src/test/regress/expected/hash_index.out index ee3f615beb5..c8403f7bc62 100644 --- a/src/test/regress/expected/hash_index.out +++ b/src/test/regress/expected/hash_index.out @@ -11,15 +11,15 @@ seqno|random -----+------ (0 rows) -QUERY: SELECT hash_name_heap.* - WHERE hash_name_heap.random = '1505703298'::name; +QUERY: SELECT hash_c16_heap.* + WHERE hash_c16_heap.random = '1505703298'::char16; seqno| random -----+---------- 9838|1505703298 (1 row) -QUERY: SELECT hash_name_heap.* - WHERE hash_name_heap.random = '7777777'::name; +QUERY: SELECT hash_c16_heap.* + WHERE hash_c16_heap.random = '7777777'::char16; seqno|random -----+------ (0 rows) @@ -72,23 +72,23 @@ i20000 20000 (1 row) -QUERY: UPDATE hash_name_heap - SET random = '0123456789abcdef'::name - WHERE hash_name_heap.seqno = 6543; +QUERY: UPDATE hash_c16_heap + SET random = '0123456789abcdef'::char16 + WHERE hash_c16_heap.seqno = 6543; QUERY: SELECT h.seqno AS i6543, h.random AS c0_to_f - FROM hash_name_heap h - WHERE h.random = '0123456789abcdef'::name; + FROM hash_c16_heap h + WHERE h.random = '0123456789abcdef'::char16; i6543|c0_to_f -----+---------------- 6543|0123456789abcdef (1 row) -QUERY: UPDATE hash_name_heap +QUERY: UPDATE hash_c16_heap SET seqno = 20000 - WHERE hash_name_heap.random = '76652222'::name; + WHERE hash_c16_heap.random = '76652222'::char16; QUERY: SELECT h.seqno AS emptyset - FROM hash_name_heap h - WHERE h.random = '76652222'::name; + FROM hash_c16_heap h + WHERE h.random = '76652222'::char16; emptyset -------- (0 rows) diff --git a/src/test/regress/expected/name.out b/src/test/regress/expected/name.out index 9d3cdd46586..e69de29bb2d 100644 --- a/src/test/regress/expected/name.out +++ b/src/test/regress/expected/name.out @@ -1,116 +0,0 @@ -QUERY: SELECT 'name string'::name = 'name string'::name AS "True"; -True ----- -t -(1 row) - -QUERY: SELECT 'name string'::name = 'name string '::name AS "False"; -False ------ -f -(1 row) - -QUERY: CREATE TABLE NAME_TBL(f1 name); -QUERY: INSERT INTO NAME_TBL(f1) VALUES ('ABCDEFGHIJKLMNOP'); -QUERY: INSERT INTO NAME_TBL(f1) VALUES ('abcdefghijklmnop'); -QUERY: INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;'); -QUERY: INSERT INTO NAME_TBL(f1) VALUES ('343f%2a'); -QUERY: INSERT INTO NAME_TBL(f1) VALUES ('d34aaasdf'); -QUERY: INSERT INTO NAME_TBL(f1) VALUES (''); -QUERY: INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'); -QUERY: SELECT '' AS seven, NAME_TBL.*; -seven|f1 ------+------------------------------- - |ABCDEFGHIJKLMNOP - |abcdefghijklmnop - |asdfghjkl; - |343f%2a - |d34aaasdf - | - |1234567890ABCDEFGHIJKLMNOPQRSTU -(7 rows) - -QUERY: SELECT '' AS six, c.f1 FROM NAME_TBL c WHERE c.f1 <> 'ABCDEFGHIJKLMNOP'; -six|f1 ----+------------------------------- - |abcdefghijklmnop - |asdfghjkl; - |343f%2a - |d34aaasdf - | - |1234567890ABCDEFGHIJKLMNOPQRSTU -(6 rows) - -QUERY: SELECT '' AS one, c.f1 FROM NAME_TBL c WHERE c.f1 = 'ABCDEFGHIJKLMNOP'; -one|f1 ----+---------------- - |ABCDEFGHIJKLMNOP -(1 row) - -QUERY: SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 < 'ABCDEFGHIJKLMNOP'; -three|f1 ------+------------------------------- - |343f%2a - | - |1234567890ABCDEFGHIJKLMNOPQRSTU -(3 rows) - -QUERY: SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 <= 'ABCDEFGHIJKLMNOP'; -four|f1 -----+------------------------------- - |ABCDEFGHIJKLMNOP - |343f%2a - | - |1234567890ABCDEFGHIJKLMNOPQRSTU -(4 rows) - -QUERY: SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 > 'ABCDEFGHIJKLMNOP'; -three|f1 ------+---------------- - |abcdefghijklmnop - |asdfghjkl; - |d34aaasdf -(3 rows) - -QUERY: SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 >= 'ABCDEFGHIJKLMNOP'; -four|f1 -----+---------------- - |ABCDEFGHIJKLMNOP - |abcdefghijklmnop - |asdfghjkl; - |d34aaasdf -(4 rows) - -QUERY: SELECT '' AS seven, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*'; -seven|f1 ------+------------------------------- - |ABCDEFGHIJKLMNOP - |abcdefghijklmnop - |asdfghjkl; - |343f%2a - |d34aaasdf - | - |1234567890ABCDEFGHIJKLMNOPQRSTU -(7 rows) - -QUERY: SELECT '' AS zero, c.f1 FROM NAME_TBL c WHERE c.f1 !~ '.*'; -zero|f1 -----+-- -(0 rows) - -QUERY: SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '[0-9]'; -three|f1 ------+------------------------------- - |343f%2a - |d34aaasdf - |1234567890ABCDEFGHIJKLMNOPQRSTU -(3 rows) - -QUERY: SELECT '' AS two, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*asdf.*'; -two|f1 ----+---------- - |asdfghjkl; - |d34aaasdf -(2 rows) - -QUERY: DROP TABLE NAME_TBL; diff --git a/src/test/regress/expected/oidname.out b/src/test/regress/expected/oidname.out index 4f8b7dadef2..e7ad5da26fe 100644 --- a/src/test/regress/expected/oidname.out +++ b/src/test/regress/expected/oidname.out @@ -4,18 +4,18 @@ QUERY: INSERT INTO OIDNAME_TBL(f1) VALUES ('1235,efgh'); QUERY: INSERT INTO OIDNAME_TBL(f1) VALUES ('987,XXXX'); QUERY: INSERT INTO OIDNAME_TBL(f1) VALUES ('123456'); ERROR: Bad input data for type oidname -QUERY: INSERT INTO OIDNAME_TBL(f1) VALUES ('123456,abcdefghijklmnopqrsutvwyz0123456789'); +QUERY: INSERT INTO OIDNAME_TBL(f1) VALUES ('123456,abcdefghijklmnopqrsutvwyz'); QUERY: INSERT INTO OIDNAME_TBL(f1) VALUES (''); ERROR: Bad input data for type oidname QUERY: INSERT INTO OIDNAME_TBL(f1) VALUES ('asdfasd'); ERROR: Bad input data for type oidname QUERY: SELECT '' AS four, OIDNAME_TBL.*; -four|f1 -----+-------------------------------------- - |1234,abcd - |1235,efgh - |987,XXXX - |123456,abcdefghijklmnopqrsutvwyz012345 +four|f1 +----+-------------------------------- + |1234,abcd + |1235,efgh + |987,XXXX + |123456,abcdefghijklmnopqrsutvwyz (4 rows) QUERY: SELECT '' AS one, o.* FROM OIDNAME_TBL o WHERE o.f1 = '1234,abcd'; @@ -25,11 +25,11 @@ one|f1 (1 row) QUERY: SELECT '' AS three, o.* FROM OIDNAME_TBL o WHERE o.f1 <> '1234,abcd'; -three|f1 ------+-------------------------------------- - |1235,efgh - |987,XXXX - |123456,abcdefghijklmnopqrsutvwyz012345 +three|f1 +-----+-------------------------------- + |1235,efgh + |987,XXXX + |123456,abcdefghijklmnopqrsutvwyz (3 rows) QUERY: SELECT '' AS two, o.* FROM OIDNAME_TBL o WHERE o.f1 <= '1234,abcd'; @@ -46,18 +46,18 @@ one|f1 (1 row) QUERY: SELECT '' AS three, o.* FROM OIDNAME_TBL o WHERE o.f1 >= '1234,abcd'; -three|f1 ------+-------------------------------------- - |1234,abcd - |1235,efgh - |123456,abcdefghijklmnopqrsutvwyz012345 +three|f1 +-----+-------------------------------- + |1234,abcd + |1235,efgh + |123456,abcdefghijklmnopqrsutvwyz (3 rows) QUERY: SELECT '' AS two, o.* FROM OIDNAME_TBL o WHERE o.f1 > '1234,abcd'; -two|f1 ----+-------------------------------------- - |1235,efgh - |123456,abcdefghijklmnopqrsutvwyz012345 +two|f1 +---+-------------------------------- + |1235,efgh + |123456,abcdefghijklmnopqrsutvwyz (2 rows) QUERY: DROP TABLE OIDNAME_TBL; diff --git a/src/test/regress/expected/sanity_check.out b/src/test/regress/expected/sanity_check.out index 8b506cbb60a..e69212ed639 100644 --- a/src/test/regress/expected/sanity_check.out +++ b/src/test/regress/expected/sanity_check.out @@ -5,14 +5,14 @@ QUERY: SELECT relname, relhasindex ORDER BY relname; relname |relhasindex --------------+----------- +bt_c16_heap |t bt_f8_heap |t bt_i4_heap |t -bt_name_heap |t bt_txt_heap |t fast_emp4000 |t +hash_c16_heap |t hash_f8_heap |t hash_i4_heap |t -hash_name_heap|t hash_txt_heap |t ihighway |t onek |t diff --git a/src/test/regress/input/copy.source b/src/test/regress/input/copy.source index 7df2c6057ad..1c93759ec20 100644 --- a/src/test/regress/input/copy.source +++ b/src/test/regress/input/copy.source @@ -34,7 +34,7 @@ COPY real_city FROM '_OBJWD_/data/real_city.data'; COPY hash_i4_heap FROM '_OBJWD_/data/hash.data'; -COPY hash_name_heap FROM '_OBJWD_/data/hash.data'; +COPY hash_c16_heap FROM '_OBJWD_/data/hash.data'; COPY hash_txt_heap FROM '_OBJWD_/data/hash.data'; @@ -49,7 +49,7 @@ COPY hash_f8_heap FROM '_OBJWD_/data/hash.data'; COPY bt_i4_heap FROM '_OBJWD_/data/desc.data'; -COPY bt_name_heap FROM '_OBJWD_/data/hash.data'; +COPY bt_c16_heap FROM '_OBJWD_/data/hash.data'; COPY bt_txt_heap FROM '_OBJWD_/data/desc.data'; diff --git a/src/test/regress/input/create_function_2.source b/src/test/regress/input/create_function_2.source index c68305b3608..6a23c53c36a 100644 --- a/src/test/regress/input/create_function_2.source +++ b/src/test/regress/input/create_function_2.source @@ -47,8 +47,8 @@ CREATE FUNCTION interpt_pp(path, path) AS '_OBJWD_/regress_DLSUFFIX_' LANGUAGE 'c'; -CREATE FUNCTION reverse_name(name) - RETURNS name +CREATE FUNCTION reverse_c16(char16) + RETURNS char16 AS '_OBJWD_/regress_DLSUFFIX_' LANGUAGE 'c'; diff --git a/src/test/regress/input/misc.source b/src/test/regress/input/misc.source index 633c50237e9..8151ff3a5a8 100644 --- a/src/test/regress/input/misc.source +++ b/src/test/regress/input/misc.source @@ -27,12 +27,12 @@ UPDATE onek -- more closely. - jolly (2/22/96) -- UPDATE temp - SET stringu1 = reverse_name(onek.stringu1) + SET stringu1 = reverse_c16(onek.stringu1) WHERE onek.stringu1 = 'JBAAAA' and onek.stringu1 = temp.stringu1; UPDATE temp - SET stringu1 = reverse_name(onek2.stringu1) + SET stringu1 = reverse_c16(onek2.stringu1) WHERE onek2.stringu1 = 'JCAAAA' and onek2.stringu1 = temp.stringu1; diff --git a/src/test/regress/output/copy.source b/src/test/regress/output/copy.source index bf12d0671d2..d417fb4e427 100644 --- a/src/test/regress/output/copy.source +++ b/src/test/regress/output/copy.source @@ -12,10 +12,10 @@ QUERY: COPY stud_emp FROM '_OBJWD_/data/stud_emp.data'; QUERY: COPY road FROM '_OBJWD_/data/streets.data'; QUERY: COPY real_city FROM '_OBJWD_/data/real_city.data'; QUERY: COPY hash_i4_heap FROM '_OBJWD_/data/hash.data'; -QUERY: COPY hash_name_heap FROM '_OBJWD_/data/hash.data'; +QUERY: COPY hash_c16_heap FROM '_OBJWD_/data/hash.data'; QUERY: COPY hash_txt_heap FROM '_OBJWD_/data/hash.data'; QUERY: COPY hash_f8_heap FROM '_OBJWD_/data/hash.data'; QUERY: COPY bt_i4_heap FROM '_OBJWD_/data/desc.data'; -QUERY: COPY bt_name_heap FROM '_OBJWD_/data/hash.data'; +QUERY: COPY bt_c16_heap FROM '_OBJWD_/data/hash.data'; QUERY: COPY bt_txt_heap FROM '_OBJWD_/data/desc.data'; QUERY: COPY bt_f8_heap FROM '_OBJWD_/data/hash.data'; diff --git a/src/test/regress/output/create_function_2.source b/src/test/regress/output/create_function_2.source index 8f3c17a6e6f..23fddb21f46 100644 --- a/src/test/regress/output/create_function_2.source +++ b/src/test/regress/output/create_function_2.source @@ -33,8 +33,8 @@ QUERY: CREATE FUNCTION interpt_pp(path, path) RETURNS point AS '_OBJWD_/regress_DLSUFFIX_' LANGUAGE 'c'; -QUERY: CREATE FUNCTION reverse_name(name) - RETURNS name +QUERY: CREATE FUNCTION reverse_c16(char16) + RETURNS char16 AS '_OBJWD_/regress_DLSUFFIX_' LANGUAGE 'c'; QUERY: LOAD '_OBJWD_/regress_DLSUFFIX_'; diff --git a/src/test/regress/output/misc.source b/src/test/regress/output/misc.source index f0ac90d7956..02eb0b6703c 100644 --- a/src/test/regress/output/misc.source +++ b/src/test/regress/output/misc.source @@ -3,13 +3,13 @@ QUERY: UPDATE onek QUERY: UPDATE onek SET unique1 = onek.unique1 - 1; QUERY: UPDATE temp - SET stringu1 = reverse_name(onek.stringu1) + SET stringu1 = reverse_c16(onek.stringu1) WHERE onek.stringu1 = 'JBAAAA' and onek.stringu1 = temp.stringu1; NOTICE: Non-functional update, only first update is performed NOTICE: Non-functional update, only first update is performed QUERY: UPDATE temp - SET stringu1 = reverse_name(onek2.stringu1) + SET stringu1 = reverse_c16(onek2.stringu1) WHERE onek2.stringu1 = 'JCAAAA' and onek2.stringu1 = temp.stringu1; NOTICE: Non-functional update, only first update is performed @@ -449,9 +449,9 @@ arrtest b_star box_tbl bprime +bt_c16_heap bt_f8_heap bt_i4_heap -bt_name_heap bt_txt_heap c_star char_tbl @@ -474,9 +474,9 @@ f_star fast_emp4000 float4_tbl float8_tbl +hash_c16_heap hash_f8_heap hash_i4_heap -hash_name_heap hash_txt_heap hobbies_r iexit diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index 848dee62c0e..f44893a9736 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -1,5 +1,5 @@ /* - * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.24 1998/03/30 17:26:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.25 1998/04/07 18:13:08 momjian Exp $ */ #include <float.h> /* faked on sunos */ @@ -25,7 +25,7 @@ extern Point *interpt_pp(PATH *p1, PATH *p2); extern void regress_lseg_construct(LSEG *lseg, Point *pt1, Point *pt2); extern char overpaid(TUPLE tuple); extern int boxarea(BOX *box); -extern char *reverse_name(char *string); +extern char *reverse_c16(char *string); /* ** Distance from a point to a path @@ -276,7 +276,7 @@ BOX *box; } char * -reverse_name(string) +reverse_c16(string) char *string; { int i; @@ -285,7 +285,7 @@ char *string; if (!(new_string = palloc(16))) { - fprintf(stderr, "reverse_name: palloc failed\n"); + fprintf(stderr, "reverse_c16: palloc failed\n"); return (NULL); } MemSet(new_string, 0, 16); diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index 9764459922f..5765560ea70 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -5,7 +5,7 @@ CREATE TABLE temp (initial int4); ALTER TABLE temp ADD COLUMN a int4; -ALTER TABLE temp ADD COLUMN b name; +ALTER TABLE temp ADD COLUMN b char16; ALTER TABLE temp ADD COLUMN c text; @@ -56,12 +56,12 @@ ALTER TABLE temp ADD COLUMN z int2[]; INSERT INTO temp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z) - VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', + VALUES (4, 'char16', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', 314159, '(1,1)', 512, '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["current" "infinity"]', - '1/3', '1,name', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); + '1/3', '1,char16', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); SELECT * FROM temp; @@ -74,7 +74,7 @@ CREATE TABLE temp ( ALTER TABLE temp ADD COLUMN a int4; -ALTER TABLE temp ADD COLUMN b name; +ALTER TABLE temp ADD COLUMN b char16; ALTER TABLE temp ADD COLUMN c text; @@ -125,12 +125,12 @@ ALTER TABLE temp ADD COLUMN z int2[]; INSERT INTO temp (a, b, c, d, e, f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v, w, x, y, z) - VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', + VALUES (4, 'char16', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)', 'Mon May 1 00:30:30 1995', 'c', '{Mon May 1 00:30:30 1995, Monday Aug 24 14:43:07 1992, epoch}', 314159, '(1,1)', 512, '1 2 3 4 5 6 7 8', 'magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)', '(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)', '["current" "infinity"]', - '1/3', '1,name', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); + '1/3', '1,char16', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}'); SELECT * FROM temp; diff --git a/src/test/regress/sql/arrays.sql b/src/test/regress/sql/arrays.sql index a82a185c922..117b27cf8a6 100644 --- a/src/test/regress/sql/arrays.sql +++ b/src/test/regress/sql/arrays.sql @@ -26,7 +26,7 @@ SELECT array_dims(arrtest.b) AS x; SELECT * FROM arrtest WHERE arrtest.a[1] < 5 and - arrtest.c = '{"foobar"}'::_name; + arrtest.c = '{"foobar"}'::_char16; -- updating array subranges seems to be broken -- diff --git a/src/test/regress/sql/btree_index.sql b/src/test/regress/sql/btree_index.sql index 71dcddd0ee2..88e4dd7f455 100644 --- a/src/test/regress/sql/btree_index.sql +++ b/src/test/regress/sql/btree_index.sql @@ -16,16 +16,16 @@ SELECT b.* WHERE b.seqno = 4500; SELECT b.* - FROM bt_name_heap b - WHERE b.seqno < '1'::name; + FROM bt_c16_heap b + WHERE b.seqno < '1'::char16; SELECT b.* - FROM bt_name_heap b - WHERE b.seqno >= '9999'::name; + FROM bt_c16_heap b + WHERE b.seqno >= '9999'::char16; SELECT b.* - FROM bt_name_heap b - WHERE b.seqno = '4500'::name; + FROM bt_c16_heap b + WHERE b.seqno = '4500'::char16; SELECT b.* FROM bt_txt_heap b diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql index e9f93eb75b4..5ba465e7a7e 100644 --- a/src/test/regress/sql/create_index.sql +++ b/src/test/regress/sql/create_index.sql @@ -11,7 +11,7 @@ CREATE INDEX onek_unique2 ON onek USING btree(unique2 int4_ops); CREATE INDEX onek_hundred ON onek USING btree(hundred int4_ops); -CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 name_ops); +CREATE INDEX onek_stringu1 ON onek USING btree(stringu1 char16_ops); CREATE INDEX tenk1_unique1 ON tenk1 USING btree(unique1 int4_ops); @@ -35,13 +35,13 @@ CREATE INDEX six ON shighway USING btree (name text_ops); -- BTREE ascending/descending cases -- -- we load int4/text from pure descending data (each key is a new --- low key) and name/f8 from pure ascending data (each key is a new +-- low key) and c16/f8 from pure ascending data (each key is a new -- high key). we had a bug where new low keys would sometimes be -- "lost". -- CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops); -CREATE INDEX bt_name_index ON bt_name_heap USING btree (seqno name_ops); +CREATE INDEX bt_c16_index ON bt_c16_heap USING btree (seqno char16_ops); CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops); @@ -61,7 +61,7 @@ CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops); -- EXTEND INDEX onek2_u2_prtl; --- CREATE INDEX onek2_stu1_prtl ON onek2 USING btree(stringu1 name_ops) +-- CREATE INDEX onek2_stu1_prtl ON onek2 USING btree(stringu1 char16_ops) -- where onek2.stringu1 >= 'J' and onek2.stringu1 < 'K'; -- @@ -80,7 +80,7 @@ CREATE INDEX rect2ind ON fast_emp4000 USING rtree (home_base bigbox_ops); -- CREATE INDEX hash_i4_index ON hash_i4_heap USING hash (random int4_ops); -CREATE INDEX hash_name_index ON hash_name_heap USING hash (random name_ops); +CREATE INDEX hash_c16_index ON hash_c16_heap USING hash (random char16_ops); CREATE INDEX hash_txt_index ON hash_txt_heap USING hash (random text_ops); diff --git a/src/test/regress/sql/create_misc.sql b/src/test/regress/sql/create_misc.sql index 495f94506f8..58ce26a2fc2 100644 --- a/src/test/regress/sql/create_misc.sql +++ b/src/test/regress/sql/create_misc.sql @@ -71,96 +71,96 @@ INSERT INTO b_star (class, b) VALUES ('b', 'bumble'::text); INSERT INTO b_star (class) VALUES ('b'); -INSERT INTO c_star (class, a, c) VALUES ('c', 5, 'hi mom'::name); +INSERT INTO c_star (class, a, c) VALUES ('c', 5, 'hi mom'::char16); INSERT INTO c_star (class, a) VALUES ('c', 6); -INSERT INTO c_star (class, c) VALUES ('c', 'hi paul'::name); +INSERT INTO c_star (class, c) VALUES ('c', 'hi paul'::char16); INSERT INTO c_star (class) VALUES ('c'); INSERT INTO d_star (class, a, b, c, d) - VALUES ('d', 7, 'grumble'::text, 'hi sunita'::name, '0.0'::float8); + VALUES ('d', 7, 'grumble'::text, 'hi sunita'::char16, '0.0'::float8); INSERT INTO d_star (class, a, b, c) - VALUES ('d', 8, 'stumble'::text, 'hi koko'::name); + VALUES ('d', 8, 'stumble'::text, 'hi koko'::char16); INSERT INTO d_star (class, a, b, d) VALUES ('d', 9, 'rumble'::text, '1.1'::float8); INSERT INTO d_star (class, a, c, d) - VALUES ('d', 10, 'hi kristin'::name, '10.01'::float8); + VALUES ('d', 10, 'hi kristin'::char16, '10.01'::float8); INSERT INTO d_star (class, b, c, d) - VALUES ('d', 'crumble'::text, 'hi boris'::name, '100.001'::float8); + VALUES ('d', 'crumble'::text, 'hi boris'::char16, '100.001'::float8); INSERT INTO d_star (class, a, b) VALUES ('d', 11, 'fumble'::text); INSERT INTO d_star (class, a, c) - VALUES ('d', 12, 'hi avi'::name); + VALUES ('d', 12, 'hi avi'::char16); INSERT INTO d_star (class, a, d) VALUES ('d', 13, '1000.0001'::float8); INSERT INTO d_star (class, b, c) - VALUES ('d', 'tumble'::text, 'hi andrew'::name); + VALUES ('d', 'tumble'::text, 'hi andrew'::char16); INSERT INTO d_star (class, b, d) VALUES ('d', 'humble'::text, '10000.00001'::float8); INSERT INTO d_star (class, c, d) - VALUES ('d', 'hi ginger'::name, '100000.000001'::float8); + VALUES ('d', 'hi ginger'::char16, '100000.000001'::float8); INSERT INTO d_star (class, a) VALUES ('d', 14); INSERT INTO d_star (class, b) VALUES ('d', 'jumble'::text); -INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::name); +INSERT INTO d_star (class, c) VALUES ('d', 'hi jolly'::char16); INSERT INTO d_star (class, d) VALUES ('d', '1000000.0000001'::float8); INSERT INTO d_star (class) VALUES ('d'); INSERT INTO e_star (class, a, c, e) - VALUES ('e', 15, 'hi carol'::name, '-1'::int2); + VALUES ('e', 15, 'hi carol'::char16, '-1'::int2); INSERT INTO e_star (class, a, c) - VALUES ('e', 16, 'hi bob'::name); + VALUES ('e', 16, 'hi bob'::char16); INSERT INTO e_star (class, a, e) VALUES ('e', 17, '-2'::int2); INSERT INTO e_star (class, c, e) - VALUES ('e', 'hi michelle'::name, '-3'::int2); + VALUES ('e', 'hi michelle'::char16, '-3'::int2); INSERT INTO e_star (class, a) VALUES ('e', 18); INSERT INTO e_star (class, c) - VALUES ('e', 'hi elisa'::name); + VALUES ('e', 'hi elisa'::char16); INSERT INTO e_star (class, e) VALUES ('e', '-4'::int2); INSERT INTO f_star (class, a, c, e, f) - VALUES ('f', 19, 'hi claire'::name, '-5'::int2, '(1,3),(2,4)'::polygon); + VALUES ('f', 19, 'hi claire'::char16, '-5'::int2, '(1,3),(2,4)'::polygon); INSERT INTO f_star (class, a, c, e) - VALUES ('f', 20, 'hi mike'::name, '-6'::int2); + VALUES ('f', 20, 'hi mike'::char16, '-6'::int2); INSERT INTO f_star (class, a, c, f) - VALUES ('f', 21, 'hi marcel'::name, '(11,44),(22,55),(33,66)'::polygon); + VALUES ('f', 21, 'hi marcel'::char16, '(11,44),(22,55),(33,66)'::polygon); INSERT INTO f_star (class, a, e, f) VALUES ('f', 22, '-7'::int2, '(111,555),(222,666),(333,777),(444,888)'::polygon); INSERT INTO f_star (class, c, e, f) - VALUES ('f', 'hi keith'::name, '-8'::int2, + VALUES ('f', 'hi keith'::char16, '-8'::int2, '(1111,3333),(2222,4444)'::polygon); INSERT INTO f_star (class, a, c) - VALUES ('f', 24, 'hi marc'::name); + VALUES ('f', 24, 'hi marc'::char16); INSERT INTO f_star (class, a, e) VALUES ('f', 25, '-9'::int2); @@ -169,10 +169,10 @@ INSERT INTO f_star (class, a, f) VALUES ('f', 26, '(11111,33333),(22222,44444)'::polygon); INSERT INTO f_star (class, c, e) - VALUES ('f', 'hi allison'::name, '-10'::int2); + VALUES ('f', 'hi allison'::char16, '-10'::int2); INSERT INTO f_star (class, c, f) - VALUES ('f', 'hi jeff'::name, + VALUES ('f', 'hi jeff'::char16, '(111111,333333),(222222,444444)'::polygon); INSERT INTO f_star (class, e, f) @@ -180,7 +180,7 @@ INSERT INTO f_star (class, e, f) INSERT INTO f_star (class, a) VALUES ('f', 27); -INSERT INTO f_star (class, c) VALUES ('f', 'hi carl'::name); +INSERT INTO f_star (class, c) VALUES ('f', 'hi carl'::char16); INSERT INTO f_star (class, e) VALUES ('f', '-12'::int2); diff --git a/src/test/regress/sql/create_table.sql b/src/test/regress/sql/create_table.sql index 7bf244b2bc1..7d046fb67ac 100644 --- a/src/test/regress/sql/create_table.sql +++ b/src/test/regress/sql/create_table.sql @@ -30,9 +30,9 @@ CREATE TABLE onek ( tenthous int4, odd int4, even int4, - stringu1 name, - stringu2 name, - string4 name + stringu1 char16, + stringu2 char16, + string4 char16 ); CREATE TABLE tenk1 ( @@ -49,9 +49,9 @@ CREATE TABLE tenk1 ( tenthous int4, odd int4, even int4, - stringu1 name, - stringu2 name, - string4 name + stringu1 char16, + stringu2 char16, + string4 char16 ); CREATE TABLE tenk2 ( @@ -68,9 +68,9 @@ CREATE TABLE tenk2 ( tenthous int4, odd int4, even int4, - stringu1 name, - stringu2 name, - string4 name + stringu1 char16, + stringu2 char16, + string4 char16 ); @@ -83,7 +83,7 @@ CREATE TABLE person ( CREATE TABLE emp ( salary int4, - manager name + manager char16 ) INHERITS (person); @@ -98,13 +98,13 @@ CREATE TABLE stud_emp ( CREATE TABLE city ( - name name, + name char16, location box, budget city_budget ); CREATE TABLE dept ( - dname name, + dname char16, mgrname text ); @@ -153,7 +153,7 @@ CREATE TABLE b_star ( ) INHERITS (a_star); CREATE TABLE c_star ( - c name + c char16 ) INHERITS (a_star); CREATE TABLE d_star ( @@ -176,7 +176,7 @@ CREATE TABLE aggtest ( CREATE TABLE arrtest ( a int2[], b int4[][][], - c name[], + c char16[], d text[][], e float8[] ); @@ -186,9 +186,9 @@ CREATE TABLE hash_i4_heap ( random int4 ); -CREATE TABLE hash_name_heap ( +CREATE TABLE hash_c16_heap ( seqno int4, - random name + random char16 ); CREATE TABLE hash_txt_heap ( @@ -214,8 +214,8 @@ CREATE TABLE bt_i4_heap ( random int4 ); -CREATE TABLE bt_name_heap ( - seqno name, +CREATE TABLE bt_c16_heap ( + seqno char16, random int4 ); diff --git a/src/test/regress/sql/destroy.sql b/src/test/regress/sql/destroy.sql index 4d4f5561884..e33abba4198 100644 --- a/src/test/regress/sql/destroy.sql +++ b/src/test/regress/sql/destroy.sql @@ -1,7 +1,7 @@ -- -- destroy.source -- --- $Header: /cvsroot/pgsql/src/test/regress/sql/Attic/destroy.sql,v 1.4 1998/03/30 17:28:09 momjian Exp $ +-- $Header: /cvsroot/pgsql/src/test/regress/sql/Attic/destroy.sql,v 1.5 1998/04/07 18:14:27 momjian Exp $ -- -- @@ -38,7 +38,7 @@ DROP FUNCTION boxarea(box); DROP FUNCTION interpt_pp(path,path); -DROP FUNCTION reverse_name(name); +DROP FUNCTION reverse_c16(char16); -- @@ -125,7 +125,7 @@ DROP INDEX six; DROP INDEX hash_i4_index; -DROP INDEX hash_name_index; +DROP INDEX hash_c16_index; DROP INDEX hash_txt_index; @@ -135,7 +135,7 @@ DROP INDEX hash_f8_index; DROP INDEX bt_i4_index; -DROP INDEX bt_name_index; +DROP INDEX bt_c16_index; DROP INDEX bt_txt_index; @@ -213,7 +213,7 @@ DROP TABLE city; DROP TABLE hash_i4_heap; -DROP TABLE hash_name_heap; +DROP TABLE hash_c16_heap; DROP TABLE hash_txt_heap; @@ -223,7 +223,7 @@ DROP TABLE hash_f8_heap; DROP TABLE bt_i4_heap; -DROP TABLE bt_name_heap; +DROP TABLE bt_c16_heap; DROP TABLE bt_txt_heap; diff --git a/src/test/regress/sql/hash_index.sql b/src/test/regress/sql/hash_index.sql index e7e9059924e..7c0cc6b3308 100644 --- a/src/test/regress/sql/hash_index.sql +++ b/src/test/regress/sql/hash_index.sql @@ -16,15 +16,15 @@ SELECT hash_i4_heap.* -- hash index -- grep 1505703298 hash.data -- -SELECT hash_name_heap.* - WHERE hash_name_heap.random = '1505703298'::name; +SELECT hash_c16_heap.* + WHERE hash_c16_heap.random = '1505703298'::char16; -- -- hash index -- grep 7777777 hash.data -- -SELECT hash_name_heap.* - WHERE hash_name_heap.random = '7777777'::name; +SELECT hash_c16_heap.* + WHERE hash_c16_heap.random = '7777777'::char16; -- -- hash index @@ -87,24 +87,24 @@ SELECT h.seqno AS i20000 FROM hash_i4_heap h WHERE h.random = 1492795354; -UPDATE hash_name_heap - SET random = '0123456789abcdef'::name - WHERE hash_name_heap.seqno = 6543; +UPDATE hash_c16_heap + SET random = '0123456789abcdef'::char16 + WHERE hash_c16_heap.seqno = 6543; SELECT h.seqno AS i6543, h.random AS c0_to_f - FROM hash_name_heap h - WHERE h.random = '0123456789abcdef'::name; + FROM hash_c16_heap h + WHERE h.random = '0123456789abcdef'::char16; -UPDATE hash_name_heap +UPDATE hash_c16_heap SET seqno = 20000 - WHERE hash_name_heap.random = '76652222'::name; + WHERE hash_c16_heap.random = '76652222'::char16; -- -- this is the row we just replaced; index scan should return zero rows -- SELECT h.seqno AS emptyset - FROM hash_name_heap h - WHERE h.random = '76652222'::name; + FROM hash_c16_heap h + WHERE h.random = '76652222'::char16; UPDATE hash_txt_heap SET random = '0123456789abcdefghijklmnop'::text diff --git a/src/test/regress/sql/name.sql b/src/test/regress/sql/name.sql index 11235caaa3d..e69de29bb2d 100644 --- a/src/test/regress/sql/name.sql +++ b/src/test/regress/sql/name.sql @@ -1,54 +0,0 @@ ---**************** testing built-in type name ************** --- --- all inputs are silently truncated at NAMEDATALEN (32) characters --- - --- fixed-length by reference -SELECT 'name string'::name = 'name string'::name AS "True"; - -SELECT 'name string'::name = 'name string '::name AS "False"; - --- --- --- - -CREATE TABLE NAME_TBL(f1 name); - -INSERT INTO NAME_TBL(f1) VALUES ('ABCDEFGHIJKLMNOP'); - -INSERT INTO NAME_TBL(f1) VALUES ('abcdefghijklmnop'); - -INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;'); - -INSERT INTO NAME_TBL(f1) VALUES ('343f%2a'); - -INSERT INTO NAME_TBL(f1) VALUES ('d34aaasdf'); - -INSERT INTO NAME_TBL(f1) VALUES (''); - -INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'); - - -SELECT '' AS seven, NAME_TBL.*; - -SELECT '' AS six, c.f1 FROM NAME_TBL c WHERE c.f1 <> 'ABCDEFGHIJKLMNOP'; - -SELECT '' AS one, c.f1 FROM NAME_TBL c WHERE c.f1 = 'ABCDEFGHIJKLMNOP'; - -SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 < 'ABCDEFGHIJKLMNOP'; - -SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 <= 'ABCDEFGHIJKLMNOP'; - -SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 > 'ABCDEFGHIJKLMNOP'; - -SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 >= 'ABCDEFGHIJKLMNOP'; - -SELECT '' AS seven, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*'; - -SELECT '' AS zero, c.f1 FROM NAME_TBL c WHERE c.f1 !~ '.*'; - -SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '[0-9]'; - -SELECT '' AS two, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*asdf.*'; - -DROP TABLE NAME_TBL; diff --git a/src/test/regress/sql/oidname.sql b/src/test/regress/sql/oidname.sql index d8d5522b65e..65fccc3c06f 100644 --- a/src/test/regress/sql/oidname.sql +++ b/src/test/regress/sql/oidname.sql @@ -10,11 +10,11 @@ INSERT INTO OIDNAME_TBL(f1) VALUES ('1235,efgh'); INSERT INTO OIDNAME_TBL(f1) VALUES ('987,XXXX'); --- no name component +-- no char16 component INSERT INTO OIDNAME_TBL(f1) VALUES ('123456'); --- name component too long -INSERT INTO OIDNAME_TBL(f1) VALUES ('123456,abcdefghijklmnopqrsutvwyz0123456789'); +-- char16 component too long +INSERT INTO OIDNAME_TBL(f1) VALUES ('123456,abcdefghijklmnopqrsutvwyz'); -- bad inputs INSERT INTO OIDNAME_TBL(f1) VALUES (''); diff --git a/src/test/regress/sql/tests b/src/test/regress/sql/tests index a7a061b9be5..79513431f17 100644 --- a/src/test/regress/sql/tests +++ b/src/test/regress/sql/tests @@ -1,6 +1,9 @@ boolean char -name +char2 +char4 +char8 +char16 varchar text strings |
