Table "public.test" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- id | integer | | | label | ltree | | | data | text | | | Indexes: "test_label_gist" gist (label) postgres@ltree=# \timing Timing is on. postgres@ltree=# CREATE INDEX test_label_gist ON test USING gist (label gist_ltree_ops); CREATE INDEX Time: 245080.481 ms (04:05.080) postgres@ltree=# レコード数は 1000 万件
9ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF'::ltree; ERROR: label string is too long LINE 1: SELECT '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123... ^ DETAIL: Label length is 256, must be at most 255, at character 257. postgres@ltree=# SELECT '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789AB CDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF012345678 9ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF'::ltree; (略) 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABC DEF0123456789ABCDEF0123456789AB CDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF012345678 9ABCDEF0123456789ABCDEF012345678 9ABCDEF (1 row) • PostgreSQL 16 beta1