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

Commit769b8c3

Browse files
committed
Recovery sr_plan commits for master branch
As part of the inclusion of scheduled mirroring, a significant part of the commits in the sr_plan repository was lost. This commit restores all the difference between the state of the code on gitlab and the actual code in the Std and EE branches
1 parentefac7c3 commit769b8c3

File tree

6 files changed

+167
-25
lines changed

6 files changed

+167
-25
lines changed

‎Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DATA_built = sr_plan--$(EXTVERSION).sql
1111
DATA = sr_plan--1.0--1.1.sql sr_plan--1.1--1.2.sql
1212

1313
EXTRA_CLEAN = sr_plan--$(EXTVERSION).sql
14-
REGRESS = sr_plan sr_plan_schema joins explain
14+
REGRESS =securitysr_plan sr_plan_schema joins explain
1515

1616
ifdefUSE_PGXS
1717
ifndefPG_CONFIG

‎expected/joins.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SET sr_plan.log_usage = NOTICE;
33
CREATE TABLE test_table(test_attr1 int, test_attr2 int);
44
INSERT INTO test_table SELECT i, i + 1 FROM generate_series(1, 20) i;
55
SET sr_plan.write_mode = true;
6+
set enable_hashjoin = false;
67
CREATE TABLE J1_TBL (i integer, j integer, t text);
78
CREATE TABLE J2_TBL (i integer, k integer);
89
INSERT INTO J1_TBL VALUES (1, 4, 'one');
@@ -595,19 +596,19 @@ NATURAL FULL JOIN
595596
ee | | 42 | 2 |
596597
(4 rows)
597598

598-
createtemptable nt1 (
599+
create table nt1 (
599600
id int primary key,
600601
a1 boolean,
601602
a2 boolean
602603
);
603-
createtemptable nt2 (
604+
create table nt2 (
604605
id int primary key,
605606
nt1_id int,
606607
b1 boolean,
607608
b2 boolean,
608609
foreign key (nt1_id) references nt1(id)
609610
);
610-
createtemptable nt3 (
611+
create table nt3 (
611612
id int primary key,
612613
nt2_id int,
613614
c1 boolean,
@@ -616,14 +617,13 @@ create temp table nt3 (
616617
insert into nt1 values (1,true,true);
617618
insert into nt1 values (2,true,false);
618619
insert into nt1 values (3,false,false);
620+
SET sr_plan.write_mode = false;
619621
insert into nt2 values (1,1,true,true);
620-
NOTICE: sr_plan: saved plan for SELECT 1 FROM ONLY "pg_temp_3"."nt1" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x
621622
insert into nt2 values (2,2,true,false);
622-
NOTICE: sr_plan: saved plan for insert into nt2 values (2,2,true,false);
623623
insert into nt2 values (3,3,false,false);
624-
NOTICE:sr_plan: saved plan for insert into nt2 values (3,3,false,false);
624+
SETsr_plan.write_mode = true;
625625
insert into nt3 values (1,1,true);
626-
NOTICE: sr_plan: saved plan for SELECT 1 FROM ONLY "pg_temp_3"."nt2" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x
626+
NOTICE: sr_plan: saved plan for SELECT 1 FROM ONLY "public"."nt2" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x
627627
insert into nt3 values (2,2,false);
628628
NOTICE: sr_plan: saved plan for insert into nt3 values (2,2,false);
629629
insert into nt3 values (3,3,true);

‎init.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RETURNS SETOF RECORD
3131
AS'MODULE_PATHNAME','show_plan'
3232
LANGUAGE C VOLATILE;
3333

34-
CREATEOR REPLACEFUNCTIONsr_plan_invalid_table() RETURNS event_trigger
34+
CREATEFUNCTIONsr_plan_invalid_table() RETURNS event_trigger
3535
LANGUAGE plpgsqlAS $$
3636
DECLARE
3737
obj record;

‎sql/joins.sql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SET sr_plan.log_usage = NOTICE;
33
CREATETABLEtest_table(test_attr1int, test_attr2int);
44
INSERT INTO test_tableSELECT i, i+1FROM generate_series(1,20) i;
55
SETsr_plan.write_mode= true;
6+
set enable_hashjoin= false;
67

78
CREATETABLEJ1_TBL (iinteger, jinteger, ttext);
89
CREATETABLEJ2_TBL (iinteger, kinteger);
@@ -180,19 +181,19 @@ NATURAL FULL JOIN
180181
(SELECT name, nas s3_nFROM t3)as s3
181182
) ss2;
182183

183-
createtemptable nt1 (
184+
createtablent1 (
184185
idintprimary key,
185186
a1boolean,
186187
a2boolean
187188
);
188-
createtemptable nt2 (
189+
createtablent2 (
189190
idintprimary key,
190191
nt1_idint,
191192
b1boolean,
192193
b2boolean,
193194
foreign key (nt1_id)references nt1(id)
194195
);
195-
createtemptable nt3 (
196+
createtablent3 (
196197
idintprimary key,
197198
nt2_idint,
198199
c1boolean,
@@ -202,9 +203,11 @@ create temp table nt3 (
202203
insert into nt1values (1,true,true);
203204
insert into nt1values (2,true,false);
204205
insert into nt1values (3,false,false);
206+
SETsr_plan.write_mode= false;
205207
insert into nt2values (1,1,true,true);
206208
insert into nt2values (2,2,true,false);
207209
insert into nt2values (3,3,false,false);
210+
SETsr_plan.write_mode= true;
208211
insert into nt3values (1,1,true);
209212
insert into nt3values (2,2,false);
210213
insert into nt3values (3,3,true);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp