mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-06 12:29:20 +02:00
This also enables hash join and hash aggregation on ltree columns. Tommy Pavlicek, reviewed by jian he Discussion: https://postgr.es/m/CAEhP-W9ZEoHeaP_nKnPCVd_o1c3BAUvq1gWHrq8EbkNRiS9CvQ@mail.gmail.com
23 lines
1.0 KiB
SQL
23 lines
1.0 KiB
SQL
/* contrib/ltree/ltreetest.sql */
|
|
|
|
-- Adjust this setting to control where the objects get created.
|
|
SET search_path = public;
|
|
|
|
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);
|
|
CREATE INDEX path_hash_idx ON test USING hash(path);
|