OSDN Git Service

SetヒントとGUCパラメータの重複に関する試験(G-2-3-*)を追加した。
[pghintplan/pg_hint_plan.git] / expected / ut-G.out
1 LOAD 'pg_hint_plan';
2 SET pg_hint_plan.enable TO on;
3 SET pg_hint_plan.debug_print TO on;
4 SET search_path TO public;
5 ----
6 ---- No. G-2-2 category of GUC parameter and role
7 ----
8 -- No. G-2-2-1
9 SET ROLE super_user;
10 /*+Set(block_size 16384)*/
11 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
12 INFO:  parameter "block_size" cannot be changed
13  c1 | c2 | c3 | c4 
14 ----+----+----+----
15   1 |  1 |  1 | 1
16 (1 row)
17
18 -- No. G-2-2-2
19 /*+Set(archive_mode off)*/
20 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
21 INFO:  parameter "archive_mode" cannot be changed without restarting the server
22  c1 | c2 | c3 | c4 
23 ----+----+----+----
24   1 |  1 |  1 | 1
25 (1 row)
26
27 -- No. G-2-2-3
28 /*+Set(archive_timeout 0)*/
29 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
30 INFO:  parameter "archive_timeout" cannot be changed now
31  c1 | c2 | c3 | c4 
32 ----+----+----+----
33   1 |  1 |  1 | 1
34 (1 row)
35
36 -- No. G-2-2-4
37 /*+Set(log_connections off)*/
38 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
39 INFO:  parameter "log_connections" cannot be set after connection start
40  c1 | c2 | c3 | c4 
41 ----+----+----+----
42   1 |  1 |  1 | 1
43 (1 row)
44
45 -- No. G-2-2-5
46 /*+Set(log_min_messages WARNING)*/
47 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
48  c1 | c2 | c3 | c4 
49 ----+----+----+----
50   1 |  1 |  1 | 1
51 (1 row)
52
53 RESET ROLE;
54 -- No. G-2-2-6
55 GRANT ALL ON SCHEMA s1 TO PUBLIC;
56 GRANT SELECT ON ALL TABLES IN SCHEMA s1 TO normal_user;
57 SET ROLE normal_user;
58 /*+Set(log_min_messages WARNING)*/
59 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
60 INFO:  permission denied to set parameter "log_min_messages"
61  c1 | c2 | c3 | c4 
62 ----+----+----+----
63   1 |  1 |  1 | 1
64 (1 row)
65
66 -- No. G-2-2-7
67 /*+Set(enable_seqscan on)*/
68 SELECT * FROM s1.t1 WHERE t1.c1 = 1;
69  c1 | c2 | c3 | c4 
70 ----+----+----+----
71   1 |  1 |  1 | 1
72 (1 row)
73
74 RESET ROLE;
75 REVOKE SELECT ON ALL TABLES IN SCHEMA s1 FROM normal_user;
76 REVOKE ALL ON SCHEMA s1 FROM PUBLIC;
77 ----
78 ---- No. G-2-3 conflict set hint
79 ----
80 SET client_min_messages TO LOG;
81 -- No. G-2-3-1
82 /*+Set(enable_indexscan on)Set(enable_indexscan off)*/
83 SELECT * FROM s1.t1 WHERE false;
84 INFO:  hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan off)"
85 DETAIL:  Conflict set hint.
86 LOG:  pg_hint_plan:
87 used hint:
88 Set(enable_indexscan off)
89 not used hint:
90 duplication hint:
91 Set(enable_indexscan on)
92 error hint:
93
94  c1 | c2 | c3 | c4 
95 ----+----+----+----
96 (0 rows)
97
98 -- No. G-2-3-2
99 /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)*/
100 SELECT * FROM s1.t1 WHERE false;
101 INFO:  hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
102 DETAIL:  Conflict set hint.
103 INFO:  hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBUG2)"
104 DETAIL:  Conflict set hint.
105 LOG:  pg_hint_plan:
106 used hint:
107 Set(client_min_messages DEBUG2)
108 not used hint:
109 duplication hint:
110 Set(client_min_messages DEBUG5)
111 Set(client_min_messages WARNING)
112 error hint:
113
114  c1 | c2 | c3 | c4 
115 ----+----+----+----
116 (0 rows)
117
118 -- No. G-2-3-3
119 /*+Set(enable_indexscan on)Set(enable_indexscan o)*/
120 SELECT * FROM s1.t1 WHERE false;
121 INFO:  hint syntax error at or near "Set(enable_indexscan on)Set(enable_indexscan o)"
122 DETAIL:  Conflict set hint.
123 INFO:  parameter "enable_indexscan" requires a Boolean value
124 LOG:  pg_hint_plan:
125 used hint:
126 not used hint:
127 duplication hint:
128 Set(enable_indexscan on)
129 error hint:
130 Set(enable_indexscan o)
131
132  c1 | c2 | c3 | c4 
133 ----+----+----+----
134 (0 rows)
135
136 -- No. G-2-3-4
137 /*+Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)*/
138 SELECT * FROM s1.t1 WHERE false;
139 INFO:  hint syntax error at or near "Set(client_min_messages DEBUG5)Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
140 DETAIL:  Conflict set hint.
141 INFO:  hint syntax error at or near "Set(client_min_messages WARNING)Set(client_min_messages DEBU)"
142 DETAIL:  Conflict set hint.
143 INFO:  invalid value for parameter "client_min_messages": "DEBU"
144 HINT:  Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error.
145 LOG:  pg_hint_plan:
146 used hint:
147 not used hint:
148 duplication hint:
149 Set(client_min_messages DEBUG5)
150 Set(client_min_messages WARNING)
151 error hint:
152 Set(client_min_messages DEBU)
153
154  c1 | c2 | c3 | c4 
155 ----+----+----+----
156 (0 rows)
157