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

Commitc9ea116

Browse files
committed
Merge branch 'PGPROEE9_6' into PGPROEE9_6_aqo
2 parentsc387c67 +c341cb4 commitc9ea116

File tree

134 files changed

+10454
-3168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+10454
-3168
lines changed

‎contrib/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ SUBDIRS = \
4343
pgrowlocks\
4444
pgstattuple\
4545
pg_visibility\
46+
pg_wait_sampling\
4647
postgres_fdw\
4748
rum\
4849
seg\

‎contrib/pg_hint_plan/expected/ut-S.out

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5026,7 +5026,7 @@ error hint:
50265026
---- No. S-3-5 not used index
50275027
----
50285028
-- No. S-3-5-1
5029-
\! psql ${PGHPBASE} -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5029+
\! psql ${PGHPBASE} -X -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50305030
LOG: statement: /*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50315031
LOG: available indexes for IndexScan(ti1): ti1_pred
50325032
LOG: pg_hint_plan:
@@ -5043,7 +5043,7 @@ error hint:
50435043
(2 rows)
50445044

50455045
-- No. S-3-5-2
5046-
\! psql ${PGHPBASE} -c "/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5046+
\! psql ${PGHPBASE} -X -c "/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50475047
LOG: statement: /*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50485048
LOG: available indexes for BitmapScan(ti1): ti1_pred
50495049
LOG: pg_hint_plan:
@@ -5060,7 +5060,7 @@ error hint:
50605060
(2 rows)
50615061

50625062
-- No. S-3-5-3
5063-
\! psql ${PGHPBASE} -c "/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5063+
\! psql ${PGHPBASE} -X -c "/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50645064
LOG: statement: /*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100
50655065
LOG: available indexes for IndexOnlyScan(ti1): ti1_pred
50665066
LOG: pg_hint_plan:
@@ -5077,7 +5077,7 @@ error hint:
50775077
(2 rows)
50785078

50795079
-- No. S-3-5-4
5080-
\! psql ${PGHPBASE} -c "/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5080+
\! psql ${PGHPBASE} -X -c "/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50815081
LOG: statement: /*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50825082
LOG: available indexes for IndexScan(ti1):
50835083
LOG: pg_hint_plan:
@@ -5094,7 +5094,7 @@ error hint:
50945094
(2 rows)
50955095

50965096
-- No. S-3-5-5
5097-
\! psql ${PGHPBASE} -c "/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5097+
\! psql ${PGHPBASE} -X -c "/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
50985098
LOG: statement: /*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100
50995099
LOG: available indexes for BitmapScan(ti1):
51005100
LOG: pg_hint_plan:
@@ -5110,8 +5110,9 @@ error hint:
51105110
Filter: (c1 = 100)
51115111
(2 rows)
51125112

5113+
51135114
-- No. S-3-5-6
5114-
\! psql ${PGHPBASE} -c "/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
5115+
\! psql ${PGHPBASE} -X -c "/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
51155116
LOG: statement: /*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100
51165117
LOG: available indexes for IndexOnlyScan(ti1):
51175118
LOG: pg_hint_plan:
@@ -5136,7 +5137,7 @@ LOG: statement: EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;
51365137
Index Cond: (c1 = 1)
51375138
(2 rows)
51385139

5139-
\! psql ${PGHPBASE} -c "/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep -v "Planning time:"
5140+
\! psql ${PGHPBASE} -X -c "/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep -v "Planning time:"
51405141
LOG: statement: /*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1
51415142
LOG: pg_hint_plan:
51425143
used hint:

‎contrib/pg_hint_plan/pg_hint_plan.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ PG_MODULE_MAGIC;
9090
errdetail detail))
9191

9292
#defineskip_space(str) \
93-
while (isspace(*str)) \
93+
while (isspace(*str) && (*str & 0x80)== 0) \
9494
str++;
9595

9696
enum
@@ -901,7 +901,7 @@ quote_value(StringInfo buf, const char *value)
901901

902902
for (str=value;*str!='\0';str++)
903903
{
904-
if (isspace(*str)||*str=='('||*str==')'||*str=='"')
904+
if ((isspace(*str)&& (((*str)&0x80)==0))||*str=='('||*str==')'||*str=='"')
905905
{
906906
need_quote= true;
907907
appendStringInfoCharMacro(buf,'"');
@@ -1249,7 +1249,7 @@ parse_keyword(const char *str, StringInfo buf)
12491249
{
12501250
skip_space(str);
12511251

1252-
while (!isspace(*str)&&*str!='('&&*str!='\0')
1252+
while (!(isspace(*str)&&(*str&0x80)==0)&&*str!='('&&*str!='\0')
12531253
appendStringInfoCharMacro(buf,*str++);
12541254

12551255
returnstr;
@@ -1329,7 +1329,7 @@ parse_quoted_value(const char *str, char **word, bool truncate)
13291329
break;
13301330
}
13311331
}
1332-
elseif (isspace(*str)||*str=='('||*str==')'||*str=='"'||
1332+
elseif ((isspace(*str)&&((*str&0x80)==0))||*str=='('||*str==')'||*str=='"'||
13331333
*str=='\0')
13341334
break;
13351335

@@ -1699,7 +1699,7 @@ get_hints_from_comment(const char *p)
16991699
if (!(*p >='0'&&*p <='9')&&
17001700
!(*p >='A'&&*p <='Z')&&
17011701
!(*p >='a'&&*p <='z')&&
1702-
!isspace(*p)&&
1702+
(!isspace(*p)|| (*p&0x80))&&
17031703
*p!='_'&&
17041704
*p!=','&&
17051705
*p!='('&&*p!=')')

‎contrib/pg_hint_plan/sql/ut-S.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -807,26 +807,26 @@ EXPLAIN (COSTS false) SELECT c2 FROM s1.ti1 WHERE c2 >= 1;
807807
----
808808

809809
-- No. S-3-5-1
810-
\! psql ${PGHPBASE}-c"/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
810+
\! psql ${PGHPBASE}-X-c"/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
811811

812812
-- No. S-3-5-2
813-
\! psql ${PGHPBASE}-c"/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
813+
\! psql ${PGHPBASE}-X-c"/*+BitmapScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
814814

815815
-- No. S-3-5-3
816-
\! psql ${PGHPBASE}-c"/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
816+
\! psql ${PGHPBASE}-X-c"/*+IndexOnlyScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
817817

818818
-- No. S-3-5-4
819-
\! psql ${PGHPBASE}-c"/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
819+
\! psql ${PGHPBASE}-X-c"/*+IndexScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
820820

821821
-- No. S-3-5-5
822-
\! psql ${PGHPBASE}-c"/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
823-
822+
\! psql ${PGHPBASE}-X-c"/*+BitmapScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
823+
824824
-- No. S-3-5-6
825-
\! psql ${PGHPBASE}-c"/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
825+
\! psql ${PGHPBASE}-X-c"/*+IndexOnlyScan(ti1 not_exist)*/ EXPLAIN (COSTS true) SELECT c1 FROM s1.ti1 WHERE c1 = 100" | grep-v"Planning time:"
826826

827827
-- No. S-3-5-7
828828
EXPLAIN (COSTS false)SELECT*FROMs1.t1WHEREt1.c1=1;
829-
\! psql ${PGHPBASE}-c"/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep-v"Planning time:"
829+
\! psql ${PGHPBASE}-X-c"/*+TidScan(t1)*/ EXPLAIN (COSTS true) SELECT * FROM s1.t1 WHERE t1.c1 = 1" | grep-v"Planning time:"
830830

831831
----
832832
---- No. S-3-6 query structure

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp