2010-09-21 04:08:53 +08:00
|
|
|
/* contrib/ltree/ltreetest.sql */
|
2007-11-13 12:24:29 +08:00
|
|
|
|
2007-11-11 11:25:35 +08:00
|
|
|
-- Adjust this setting to control where the objects get created.
|
|
|
|
SET search_path = public;
|
|
|
|
|
2002-10-19 02:41:22 +08:00
|
|
|
CREATE TABLE test ( path ltree);
|
|
|
|
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);
|