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

Commitd49bb6e

Browse files
author
Arseny Kositsyn
committed
[PGPRO-11599] Code review. Part 1.
Tags: rum
1 parent6c3a712 commitd49bb6e

File tree

4 files changed

+36
-32
lines changed

4 files changed

+36
-32
lines changed

‎expected/altorder.out‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -575,14 +575,15 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE
575575

576576
CREATE TABLE test_table (id bigint, folder bigint, time bigint, tsv tsvector);
577577
CREATE INDEX test_idx ON test_table USING rum(folder, tsv rum_tsvector_addon_ops, time) with (attach = 'time', to = 'tsv', order_by_attach=TRUE);
578-
INSERT INTO test_table (id, folder, time, tsv) VALUES (1, 10, 100, to_tsvector('wordA'));
579-
INSERT INTO test_table (id, folder, time, tsv) VALUES (2, 20, 200, to_tsvector('wordB'));
580-
INSERT INTO test_table (id, folder, time, tsv) VALUES (3, 10, 300, to_tsvector('wordA'));
581-
INSERT INTO test_table (id, folder, time, tsv) VALUES (4, 20, 400, to_tsvector('wordB'));
582-
INSERT INTO test_table (id, folder, time, tsv) VALUES (5, 20, 60, to_tsvector('wordB'));
583-
INSERT INTO test_table (id, folder, time, tsv) VALUES (6, 10, 40, to_tsvector('wordA'));
584-
INSERT INTO test_table (id, folder, time, tsv) VALUES (7, 20, 50, to_tsvector('wordB'));
585-
INSERT INTO test_table (id, folder, time, tsv) VALUES (8, 10, 30, to_tsvector('wordA'));
578+
INSERT INTO test_table (id, folder, time, tsv) VALUES
579+
(1, 10, 100, to_tsvector('wordA')),
580+
(2, 20, 200, to_tsvector('wordB')),
581+
(3, 10, 300, to_tsvector('wordA')),
582+
(4, 20, 400, to_tsvector('wordB')),
583+
(5, 20, 60, to_tsvector('wordB')),
584+
(6, 10, 40, to_tsvector('wordA')),
585+
(7, 20, 50, to_tsvector('wordB')),
586+
(8, 10, 30, to_tsvector('wordA'));
586587
EXPLAIN (costs off)
587588
SELECT * FROM test_table WHERE tsv @@ (to_tsquery('wordA')) AND (folder = 10::bigint);
588589
QUERY PLAN

‎expected/altorder_1.out‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -575,14 +575,15 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE
575575
CREATE TABLE test_table (id bigint, folder bigint, time bigint, tsv tsvector);
576576
CREATE INDEX test_idx ON test_table USING rum(folder, tsv rum_tsvector_addon_ops, time) with (attach = 'time', to = 'tsv', order_by_attach=TRUE);
577577
ERROR: doesn't support order index over pass-by-reference column
578-
INSERT INTO test_table (id, folder, time, tsv) VALUES (1, 10, 100, to_tsvector('wordA'));
579-
INSERT INTO test_table (id, folder, time, tsv) VALUES (2, 20, 200, to_tsvector('wordB'));
580-
INSERT INTO test_table (id, folder, time, tsv) VALUES (3, 10, 300, to_tsvector('wordA'));
581-
INSERT INTO test_table (id, folder, time, tsv) VALUES (4, 20, 400, to_tsvector('wordB'));
582-
INSERT INTO test_table (id, folder, time, tsv) VALUES (5, 20, 60, to_tsvector('wordB'));
583-
INSERT INTO test_table (id, folder, time, tsv) VALUES (6, 10, 40, to_tsvector('wordA'));
584-
INSERT INTO test_table (id, folder, time, tsv) VALUES (7, 20, 50, to_tsvector('wordB'));
585-
INSERT INTO test_table (id, folder, time, tsv) VALUES (8, 10, 30, to_tsvector('wordA'));
578+
INSERT INTO test_table (id, folder, time, tsv) VALUES
579+
(1, 10, 100, to_tsvector('wordA')),
580+
(2, 20, 200, to_tsvector('wordB')),
581+
(3, 10, 300, to_tsvector('wordA')),
582+
(4, 20, 400, to_tsvector('wordB')),
583+
(5, 20, 60, to_tsvector('wordB')),
584+
(6, 10, 40, to_tsvector('wordA')),
585+
(7, 20, 50, to_tsvector('wordB')),
586+
(8, 10, 30, to_tsvector('wordA'));
586587
EXPLAIN (costs off)
587588
SELECT * FROM test_table WHERE tsv @@ (to_tsquery('wordA')) AND (folder = 10::bigint);
588589
QUERY PLAN

‎expected/altorder_2.out‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -585,14 +585,15 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE
585585
CREATE TABLE test_table (id bigint, folder bigint, time bigint, tsv tsvector);
586586
CREATE INDEX test_idx ON test_table USING rum(folder, tsv rum_tsvector_addon_ops, time) with (attach = 'time', to = 'tsv', order_by_attach=TRUE);
587587
ERROR: doesn't support order index over pass-by-reference column
588-
INSERT INTO test_table (id, folder, time, tsv) VALUES (1, 10, 100, to_tsvector('wordA'));
589-
INSERT INTO test_table (id, folder, time, tsv) VALUES (2, 20, 200, to_tsvector('wordB'));
590-
INSERT INTO test_table (id, folder, time, tsv) VALUES (3, 10, 300, to_tsvector('wordA'));
591-
INSERT INTO test_table (id, folder, time, tsv) VALUES (4, 20, 400, to_tsvector('wordB'));
592-
INSERT INTO test_table (id, folder, time, tsv) VALUES (5, 20, 60, to_tsvector('wordB'));
593-
INSERT INTO test_table (id, folder, time, tsv) VALUES (6, 10, 40, to_tsvector('wordA'));
594-
INSERT INTO test_table (id, folder, time, tsv) VALUES (7, 20, 50, to_tsvector('wordB'));
595-
INSERT INTO test_table (id, folder, time, tsv) VALUES (8, 10, 30, to_tsvector('wordA'));
588+
INSERT INTO test_table (id, folder, time, tsv) VALUES
589+
(1, 10, 100, to_tsvector('wordA')),
590+
(2, 20, 200, to_tsvector('wordB')),
591+
(3, 10, 300, to_tsvector('wordA')),
592+
(4, 20, 400, to_tsvector('wordB')),
593+
(5, 20, 60, to_tsvector('wordB')),
594+
(6, 10, 40, to_tsvector('wordA')),
595+
(7, 20, 50, to_tsvector('wordB')),
596+
(8, 10, 30, to_tsvector('wordA'));
596597
EXPLAIN (costs off)
597598
SELECT * FROM test_table WHERE tsv @@ (to_tsquery('wordA')) AND (folder = 10::bigint);
598599
QUERY PLAN

‎sql/altorder.sql‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,15 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE
102102
CREATETABLEtest_table (idbigint, folderbigint,timebigint, tsv tsvector);
103103
CREATEINDEXtest_idxON test_table USING rum(folder, tsv rum_tsvector_addon_ops,time) with (attach='time', to='tsv', order_by_attach=TRUE);
104104

105-
INSERT INTO test_table (id, folder,time, tsv)VALUES (1,10,100, to_tsvector('wordA'));
106-
INSERT INTO test_table (id, folder,time, tsv)VALUES (2,20,200, to_tsvector('wordB'));
107-
INSERT INTO test_table (id, folder,time, tsv)VALUES (3,10,300, to_tsvector('wordA'));
108-
INSERT INTO test_table (id, folder,time, tsv)VALUES (4,20,400, to_tsvector('wordB'));
109-
INSERT INTO test_table (id, folder,time, tsv)VALUES (5,20,60, to_tsvector('wordB'));
110-
INSERT INTO test_table (id, folder,time, tsv)VALUES (6,10,40, to_tsvector('wordA'));
111-
INSERT INTO test_table (id, folder,time, tsv)VALUES (7,20,50, to_tsvector('wordB'));
112-
INSERT INTO test_table (id, folder,time, tsv)VALUES (8,10,30, to_tsvector('wordA'));
105+
INSERT INTO test_table (id, folder,time, tsv)VALUES
106+
(1,10,100, to_tsvector('wordA')),
107+
(2,20,200, to_tsvector('wordB')),
108+
(3,10,300, to_tsvector('wordA')),
109+
(4,20,400, to_tsvector('wordB')),
110+
(5,20,60, to_tsvector('wordB')),
111+
(6,10,40, to_tsvector('wordA')),
112+
(7,20,50, to_tsvector('wordB')),
113+
(8,10,30, to_tsvector('wordA'));
113114

114115
EXPLAIN (costs off)
115116
SELECT*FROM test_tableWHERE tsv @@ (to_tsquery('wordA'))AND (folder=10::bigint);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp