? config.log ? src/test/regress/sql/out1 Index: src/backend/commands/tablecmds.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/commands/tablecmds.c,v retrieving revision 1.31 diff -c -r1.31 tablecmds.c *** src/backend/commands/tablecmds.c 2002/08/22 04:51:05 1.31 --- src/backend/commands/tablecmds.c 2002/08/22 14:51:11 *************** *** 3405,3416 **** /* * Create unique index on chunk_id, chunk_seq. * ! * NOTE: the tuple toaster could actually function with a single-column ! * index on chunk_id only. However, it couldn't be unique then. We ! * want it to be unique as a check against the possibility of ! * duplicate TOAST chunk OIDs. Too, the index might be a little more ! * efficient this way, since btree isn't all that happy with large ! * numbers of equal keys. */ indexInfo = makeNode(IndexInfo); --- 3405,3417 ---- /* * Create unique index on chunk_id, chunk_seq. * ! * NOTE: the normal TOAST access routines could actually function with ! * a single-column index on chunk_id only. However, the slice access ! * routines use both columns for faster access to an individual chunk. ! * In addition, we want it to be unique as a check against the ! * possibility of duplicate TOAST chunk OIDs. The index might also be ! * a little more efficient this way, since btree isn't all that happy ! * with large numbers of equal keys. */ indexInfo = makeNode(IndexInfo); Index: src/test/regress/expected/strings.out =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/test/regress/expected/strings.out,v retrieving revision 1.15 diff -c -r1.15 strings.out *** src/test/regress/expected/strings.out 2002/08/22 03:24:01 1.15 --- src/test/regress/expected/strings.out 2002/08/22 14:51:15 *************** *** 579,592 **** CREATE TABLE toasttest(f1 text); insert into toasttest values(repeat('1234567890',10000)); insert into toasttest values(repeat('1234567890',10000)); -- If the starting position is zero or less, then return from the start of the string -- adjusting the length to be consistent with the "negative start" per SQL92. SELECT substr(f1, -1, 5) from toasttest; substr -------- 123 123 ! (2 rows) -- If the length is less than zero, an ERROR is thrown. SELECT substr(f1, 5, -1) from toasttest; --- 579,601 ---- CREATE TABLE toasttest(f1 text); insert into toasttest values(repeat('1234567890',10000)); insert into toasttest values(repeat('1234567890',10000)); + -- + -- Ensure that some values are uncompressed, to test the faster substring + -- operation used in that case + -- + alter table toasttest alter column f1 set storage external; + insert into toasttest values(repeat('1234567890',10000)); + insert into toasttest values(repeat('1234567890',10000)); -- If the starting position is zero or less, then return from the start of the string -- adjusting the length to be consistent with the "negative start" per SQL92. SELECT substr(f1, -1, 5) from toasttest; substr -------- 123 + 123 123 ! 123 ! (4 rows) -- If the length is less than zero, an ERROR is thrown. SELECT substr(f1, 5, -1) from toasttest; *************** *** 597,604 **** substr -------- 567890 567890 ! (2 rows) -- If start plus length is > string length, the result is truncated to -- string length --- 606,615 ---- substr -------- 567890 + 567890 567890 ! 567890 ! (4 rows) -- If start plus length is > string length, the result is truncated to -- string length *************** *** 606,613 **** substr -------- 567890 567890 ! (2 rows) DROP TABLE toasttest; -- --- 617,626 ---- substr -------- 567890 + 567890 567890 ! 567890 ! (4 rows) DROP TABLE toasttest; -- *************** *** 616,629 **** CREATE TABLE toasttest(f1 bytea); insert into toasttest values(decode(repeat('1234567890',10000),'escape')); insert into toasttest values(decode(repeat('1234567890',10000),'escape')); -- If the starting position is zero or less, then return from the start of the string -- adjusting the length to be consistent with the "negative start" per SQL92. SELECT substr(f1, -1, 5) from toasttest; substr -------- 123 123 ! (2 rows) -- If the length is less than zero, an ERROR is thrown. SELECT substr(f1, 5, -1) from toasttest; --- 629,651 ---- CREATE TABLE toasttest(f1 bytea); insert into toasttest values(decode(repeat('1234567890',10000),'escape')); insert into toasttest values(decode(repeat('1234567890',10000),'escape')); + -- + -- Ensure that some values are uncompressed, to test the faster substring + -- operation used in that case + -- + alter table toasttest alter column f1 set storage external; + insert into toasttest values(decode(repeat('1234567890',10000),'escape')); + insert into toasttest values(decode(repeat('1234567890',10000),'escape')); -- If the starting position is zero or less, then return from the start of the string -- adjusting the length to be consistent with the "negative start" per SQL92. SELECT substr(f1, -1, 5) from toasttest; substr -------- 123 + 123 + 123 123 ! (4 rows) -- If the length is less than zero, an ERROR is thrown. SELECT substr(f1, 5, -1) from toasttest; *************** *** 635,641 **** -------- 567890 567890 ! (2 rows) -- If start plus length is > string length, the result is truncated to -- string length --- 657,665 ---- -------- 567890 567890 ! 567890 ! 567890 ! (4 rows) -- If start plus length is > string length, the result is truncated to -- string length *************** *** 643,650 **** substr -------- 567890 567890 ! (2 rows) DROP TABLE toasttest; -- --- 667,676 ---- substr -------- 567890 + 567890 + 567890 567890 ! (4 rows) DROP TABLE toasttest; -- Index: src/test/regress/sql/strings.sql =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/test/regress/sql/strings.sql,v retrieving revision 1.9 diff -c -r1.9 strings.sql *** src/test/regress/sql/strings.sql 2002/08/22 03:24:01 1.9 --- src/test/regress/sql/strings.sql 2002/08/22 14:51:15 *************** *** 206,211 **** --- 206,219 ---- insert into toasttest values(repeat('1234567890',10000)); insert into toasttest values(repeat('1234567890',10000)); + -- + -- Ensure that some values are uncompressed, to test the faster substring + -- operation used in that case + -- + alter table toasttest alter column f1 set storage external; + insert into toasttest values(repeat('1234567890',10000)); + insert into toasttest values(repeat('1234567890',10000)); + -- If the starting position is zero or less, then return from the start of the string -- adjusting the length to be consistent with the "negative start" per SQL92. SELECT substr(f1, -1, 5) from toasttest; *************** *** 228,233 **** --- 236,249 ---- -- CREATE TABLE toasttest(f1 bytea); + insert into toasttest values(decode(repeat('1234567890',10000),'escape')); + insert into toasttest values(decode(repeat('1234567890',10000),'escape')); + + -- + -- Ensure that some values are uncompressed, to test the faster substring + -- operation used in that case + -- + alter table toasttest alter column f1 set storage external; insert into toasttest values(decode(repeat('1234567890',10000),'escape')); insert into toasttest values(decode(repeat('1234567890',10000),'escape'));