-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlpathtreetest.sql
21 lines (19 loc) · 1006 Bytes
/
lpathtreetest.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* contrib/lpathtree/lpathtreetest.sql */
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE TABLE test ( path lpathtree);
INSERT INTO test VALUES ('Top');
INSERT INTO test VALUES ('Top/Science');
INSERT INTO test VALUES ('Top/Science/Astronomy');
INSERT INTO test VALUES ('Top/Science/Astronomy/Astrophysics');
INSERT INTO test VALUES ('Top/Science/Astronomy/Cosmology');
INSERT INTO test VALUES ('Top/Hobbies');
INSERT INTO test VALUES ('Top/Hobbies/Amateurs_Astronomy');
INSERT INTO test VALUES ('Top/Collections');
INSERT INTO test VALUES ('Top/Collections/Pictures');
INSERT INTO test VALUES ('Top/Collections/Pictures/Astronomy');
INSERT INTO test VALUES ('Top/Collections/Pictures/Astronomy/Stars');
INSERT INTO test VALUES ('Top/Collections/Pictures/Astronomy/Galaxies');
INSERT INTO test VALUES ('Top/Collections/Pictures/Astronomy/Astronauts');
CREATE INDEX path_gist_idx ON test USING gist(path);
CREATE INDEX path_idx ON test USING btree(path);