File: interrupt.sql

package info (click to toggle)
postgis 3.5.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 70,052 kB
  • sloc: ansic: 162,204; sql: 93,950; xml: 53,121; cpp: 12,646; perl: 5,658; sh: 5,369; makefile: 3,434; python: 1,205; 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);