File: regress_lots_of_3dpoints.sql

package info (click to toggle)
postgis 2.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 58,660 kB
  • ctags: 10,181
  • sloc: ansic: 132,858; sql: 131,148; xml: 46,460; sh: 4,832; perl: 4,476; makefile: 2,749; python: 1,198; yacc: 442; lex: 131
file content (14 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
CREATE TABLE "test" (
        "num" integer,
        "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;