@@ -98,8 +98,8 @@ SELECT ARRAY(SELECT unnest(range(10))) AS subquery_result;
98
98
The ` scalar_subquery_error_on_multiple_rows ` setting can be set to ` false ` to revert this behavior.
99
99
100
100
``` sql
101
- SET scalar_subquery_error_on_multiple_rows= false;
102
- SELECT (SELECT unnest(range(10 ))) as result;
101
+ SET scalar_subquery_error_on_multiple_rows = false;
102
+ SELECT (SELECT unnest(range(10 ))) AS result;
103
103
```
104
104
``` text
105
105
┌────────┐
@@ -402,19 +402,22 @@ INSTALL spatial;
402
402
LOAD spatial;
403
403
404
404
-- Create a table with 10_000_000 random points
405
- CREATE TABLE t1 AS SELECT point ::GEOMETRY as geom
405
+ CREATE TABLE t1 AS SELECT point ::GEOMETRY AS geom
406
406
FROM st_generatepoints(
407
407
{min_x: 0 , min_y: 0 , max_x: 10_000, max_y: 10_000}::BOX_2D,
408
408
10_000_000,
409
409
1337
410
410
);
411
411
412
- -- Create an index on the table.
412
+ -- Create an index on the table
413
413
CREATE INDEX my_idx ON t1 USING RTREE (geom);
414
414
415
- -- Perform a query with a "spatial predicate" on the indexed geometry column
416
- -- Note how the second argument in this case, the ST_MakeEnvelope call is a "constant"
417
- SELECT count (* ) FROM t1 WHERE ST_Within(geom, ST_MakeEnvelope(450 , 450 , 650 , 650 ));
415
+ -- Perform a query with a "spatial predicate" on the indexed geometry
416
+ -- column. Note how the second argument in this case,
417
+ -- the ST_MakeEnvelope call is a "constant"
418
+ SELECT count (* )
419
+ FROM t1
420
+ WHERE ST_Within(geom, ST_MakeEnvelope(450 , 450 , 650 , 650 ));
418
421
```
419
422
420
423
``` text
0 commit comments