Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfd1ac9a

Browse files
committed
Make compression.sql regression test independent of default.
This test will fail in "make installcheck" if the installation'sdefault_toast_compression setting is not 'pglz'. Make it robustagainst that situation.Dilip KumarDiscussion:https://postgr.es/m/CAFiTN-t0w+Rc2U3S+y=7KWcLuOYNB5MfWeGdNa7+pg0UovVdcQ@mail.gmail.com
1 parentef82387 commitfd1ac9a

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

‎src/test/regress/expected/compression.out

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
\set HIDE_TOAST_COMPRESSION false
2+
-- ensure we get stable results regardless of installation's default
3+
SET default_toast_compression = 'pglz';
24
-- test creating table with compression method
35
CREATE TABLE cmdata(f1 text COMPRESSION pglz);
46
CREATE INDEX idx ON cmdata(f1);
@@ -245,6 +247,7 @@ CREATE TABLE cmdata2 (f1 text);
245247
--------+------+-----------+----------+---------+----------+-------------+--------------+-------------
246248
f1 | text | | | | extended | lz4 | |
247249

250+
SET default_toast_compression = 'pglz';
248251
-- test alter compression method
249252
ALTER TABLE cmdata ALTER COLUMN f1 SET COMPRESSION lz4;
250253
INSERT INTO cmdata VALUES (repeat('123456789', 4004));

‎src/test/regress/expected/compression_1.out

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
\set HIDE_TOAST_COMPRESSION false
2+
-- ensure we get stable results regardless of installation's default
3+
SET default_toast_compression = 'pglz';
24
-- test creating table with compression method
35
CREATE TABLE cmdata(f1 text COMPRESSION pglz);
46
CREATE INDEX idx ON cmdata(f1);
@@ -241,6 +243,7 @@ CREATE TABLE cmdata2 (f1 text);
241243
--------+------+-----------+----------+---------+----------+-------------+--------------+-------------
242244
f1 | text | | | | extended | pglz | |
243245

246+
SET default_toast_compression = 'pglz';
244247
-- test alter compression method
245248
ALTER TABLE cmdata ALTER COLUMN f1 SET COMPRESSION lz4;
246249
ERROR: unsupported LZ4 compression method

‎src/test/regress/sql/compression.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
\set HIDE_TOAST_COMPRESSION false
22

3+
-- ensure we get stable results regardless of installation's default
4+
SET default_toast_compression='pglz';
5+
36
-- test creating table with compression method
47
CREATETABLEcmdata(f1text COMPRESSION pglz);
58
CREATEINDEXidxON cmdata(f1);
@@ -100,6 +103,7 @@ SET default_toast_compression = 'lz4';
100103
DROPTABLE cmdata2;
101104
CREATETABLEcmdata2 (f1text);
102105
\d+ cmdata2
106+
SET default_toast_compression='pglz';
103107

104108
-- test alter compression method
105109
ALTERTABLE cmdata ALTER COLUMN f1SET COMPRESSION lz4;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp