mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-26 00:07:01 +08:00
Fix interaction of TOAST compression with expression indexes.
Before, trying to compress a value for insertion into an expression index would crash. Dilip Kumar, with some editing by me. Report by Jaime Casanova. Discussion: http://postgr.es/m/CAJKUy5gcs0zGOp6JXU2mMVdthYhuQpFk=S3V8DOKT=LZC1L36Q@mail.gmail.com
This commit is contained in:
@ -130,6 +130,13 @@ SELECT pg_column_compression(f1) FROM cmdata;
|
||||
VACUUM FULL cmdata;
|
||||
SELECT pg_column_compression(f1) FROM cmdata;
|
||||
|
||||
-- test expression index
|
||||
DROP TABLE cmdata2;
|
||||
CREATE TABLE cmdata2 (f1 TEXT COMPRESSION pglz, f2 TEXT COMPRESSION lz4);
|
||||
CREATE UNIQUE INDEX idx1 ON cmdata2 ((f1 || f2));
|
||||
INSERT INTO cmdata2 VALUES((SELECT array_agg(md5(g::TEXT))::TEXT FROM
|
||||
generate_series(1, 50) g), VERSION());
|
||||
|
||||
-- check data is ok
|
||||
SELECT length(f1) FROM cmdata;
|
||||
SELECT length(f1) FROM cmdata1;
|
||||
|
||||
Reference in New Issue
Block a user