File: interrupt.sql

package info (click to toggle)
postgis 3.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 74,680 kB
  • sloc: ansic: 163,427; sql: 95,196; xml: 54,290; cpp: 12,646; perl: 5,875; sh: 5,415; makefile: 3,492; python: 1,207; yacc: 447; lex: 151; pascal: 58
file content (19 lines) | stat: -rw-r--r-- 548 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- liblwgeom interruption
set client_min_messages to WARNING;

\i :regdir/utils/timecheck.sql

-----------------
-- ST_Segmentize
-----------------

SET statement_timeout TO 100;
-- would run for many seconds if uninterruptible...
SELECT 'segmentize', ST_NPoints(ST_Segmentize(ST_MakeLine(ST_Point(4,39), ST_Point(1,41)), 1e-8));

SELECT _timecheck('segmentize', '500ms');
SET statement_timeout TO 0;
-- Not affected by old timeout
SELECT '1',ST_AsText(ST_Segmentize('LINESTRING(0 0,4 0)'::geometry, 2));

DROP FUNCTION _timecheck(text, interval);