File: regress_lots_of_3dpoints.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 (14 lines) | stat: -rw-r--r-- 327 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
CREATE TABLE "test" (
	"num" bigint,
	"the_geom" geometry
);

INSERT INTO test (num, the_geom)
    SELECT i,
    CASE
        WHEN i%1000 = 0 THEN NULL
        WHEN i%1100 = 0 THEN 'POINTZ EMPTY'::geometry
    ELSE
        st_makepoint(i::numeric/10, i::numeric/10, i::numeric/10)
    END
    FROM generate_series(1, 20000) i;