File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -236,3 +236,18 @@ SELECT status FROM http_get('http://localhost:9080/delay/7');
236236 200
237237(1 row)
238238
239+ -- Check that statement interruption works
240+ SET statement_timeout = 200;
241+ CREATE TEMPORARY TABLE timer AS
242+ SELECT now() AS start;
243+ SELECT *
244+ FROM http_get('http://localhost:9080/delay/7');
245+ ERROR: canceling statement due to user request
246+ SELECT round(extract(epoch FROM now() - start) * 10) AS m
247+ FROM timer;
248+ m
249+ ---
250+ 2
251+ (1 row)
252+
253+ DROP TABLE timer;
Original file line number Diff line number Diff line change @@ -147,3 +147,16 @@ SELECT status FROM http_get('http://localhost:9080/status/555');
147147-- the default (5s), but shorter than the new timeout
148148SELECT http_set_curlopt(' CURLOPT_TIMEOUT_MS' , ' 10000' );
149149SELECT status FROM http_get(' http://localhost:9080/delay/7' );
150+
151+ -- Check that statement interruption works
152+ SET statement_timeout = 200 ;
153+ CREATE TEMPORARY TABLE timer AS
154+ SELECT now() AS start;
155+ SELECT *
156+ FROM http_get(' http://localhost:9080/delay/7' );
157+ SELECT round(extract(epoch FROM now() - start) * 10 ) AS m
158+ FROM timer;
159+ DROP TABLE timer;
160+
161+
162+
You can’t perform that action at this time.
0 commit comments