|
|
|
@ -33,4 +33,48 @@ SELECT * FROM src2; |
|
|
|
|
(1 row) |
|
|
|
|
|
|
|
|
|
DROP TABLE src2; |
|
|
|
|
-- https://github.com/Percona-Lab/pg_tde/issues/82 |
|
|
|
|
CREATE TABLE indtoasttest(descr text, cnt int DEFAULT 0, f1 text, f2 text) using pg_tde; |
|
|
|
|
INSERT INTO indtoasttest(descr, f1, f2) VALUES('two-compressed', repeat('1234567890',1000), repeat('1234567890',1000)); |
|
|
|
|
INSERT INTO indtoasttest(descr, f1, f2) VALUES('two-toasted', repeat('1234567890',30000), repeat('1234567890',50000)); |
|
|
|
|
INSERT INTO indtoasttest(descr, f1, f2) VALUES('one-compressed,one-null', NULL, repeat('1234567890',1000)); |
|
|
|
|
INSERT INTO indtoasttest(descr, f1, f2) VALUES('one-toasted,one-null', NULL, repeat('1234567890',50000)); |
|
|
|
|
UPDATE indtoasttest SET cnt = cnt +1 RETURNING substring(indtoasttest::text, 1, 200); |
|
|
|
|
substring |
|
|
|
|
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
(two-compressed,1,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 |
|
|
|
|
(two-toasted,1,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 |
|
|
|
|
("one-compressed,one-null",1,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 |
|
|
|
|
("one-toasted,one-null",1,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 |
|
|
|
|
(4 rows) |
|
|
|
|
|
|
|
|
|
UPDATE indtoasttest SET cnt = cnt +1, f1 = f1 RETURNING substring(indtoasttest::text, 1, 200); |
|
|
|
|
substring |
|
|
|
|
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
(two-compressed,2,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 |
|
|
|
|
(two-toasted,2,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 |
|
|
|
|
("one-compressed,one-null",2,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 |
|
|
|
|
("one-toasted,one-null",2,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 |
|
|
|
|
(4 rows) |
|
|
|
|
|
|
|
|
|
UPDATE indtoasttest SET cnt = cnt +1, f1 = f1||'' RETURNING substring(indtoasttest::text, 1, 200); |
|
|
|
|
substring |
|
|
|
|
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
(two-compressed,3,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 |
|
|
|
|
(two-toasted,3,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 |
|
|
|
|
("one-compressed,one-null",3,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 |
|
|
|
|
("one-toasted,one-null",3,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 |
|
|
|
|
(4 rows) |
|
|
|
|
|
|
|
|
|
UPDATE indtoasttest SET cnt = cnt +1, f1 = f1||'' RETURNING substring(indtoasttest::text, 1, 200); |
|
|
|
|
substring |
|
|
|
|
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
(two-compressed,4,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 |
|
|
|
|
(two-toasted,4,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 |
|
|
|
|
("one-compressed,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 |
|
|
|
|
("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123 |
|
|
|
|
(4 rows) |
|
|
|
|
|
|
|
|
|
UPDATE indtoasttest SET f2 = '+'||f2||'-' ; |
|
|
|
|
DROP TABLE indtoasttest; |
|
|
|
|
DROP EXTENSION pg_tde; |
|
|
|
|