GIN indexes are refused with "index method gin is not yet supported"
On DoltgreSQL 1.3.1, CREATE INDEX ... USING gin fails and creates no index, whether the index is on an
integer array column, a jsonb column or a full-text expression:
ERROR: index method gin is not yet supported
PostgreSQL 18.6 creates the same index, and pg_indexes lists it afterwards.
Reproduction
-- A table with an integer array column.
CREATE TABLE t (id int PRIMARY KEY, tags int[]);
-- A GIN index on the array column.
CREATE INDEX t_tags_idx ON t USING gin (tags);
-- The table's indexes afterwards.
SELECT indexdef FROM pg_indexes
WHERE tablename = 't' ORDER BY indexname;
Expected behavior
The index is created, and pg_indexes lists it next to the primary key's index. This is what
PostgreSQL 18.6 does:
CREATE INDEX t_tags_idx ON t USING gin (tags);
CREATE INDEX
-- The table's indexes afterwards.
SELECT indexdef FROM pg_indexes
WHERE tablename = 't' ORDER BY indexname;
indexdef
---------------------------------------------------------
CREATE UNIQUE INDEX t_pkey ON public.t USING btree (id)
CREATE INDEX t_tags_idx ON public.t USING gin (tags)
(2 rows)
Actual behavior
The CREATE INDEX fails, and pg_indexes lists only the primary key's index. This is what
DoltgreSQL 1.3.1 does:
CREATE INDEX t_tags_idx ON t USING gin (tags);
psql:/tmp/repro.sql:5: ERROR: index method gin is not yet supported
-- The table's indexes afterwards.
SELECT indexdef FROM pg_indexes
WHERE tablename = 't' ORDER BY indexname;
indexdef
---------------------------------------------------------
CREATE UNIQUE INDEX t_pkey ON public.t USING btree (id)
(1 row)
Run it
A runnable reproduction is at https://github.com/Reliable-Collaboration/repro-doltgresql-bug-gin-index. Its script runs the test on PostgreSQL and DoltgreSQL in throwaway containers and prints the two outputs side by side:
git clone https://github.com/Reliable-Collaboration/repro-doltgresql-bug-gin-index.git
cd repro-doltgresql-bug-gin-index
./repro.sh
Other observations
Each was run on the same two images with the same psql command:
- A GIN index on a
jsonbcolumn fails with the same error, with or without thejsonb_path_opsoperator class, and so does a GIN index on a table that already holds rows. PostgreSQL creates them. - A GIN index over a full-text expression,
USING gin (to_tsvector('english', body))on atextcolumn, fails with the same error; PostgreSQL creates it. On its own,SELECT to_tsvector('english', 'fat cats')answersfunction: 'to_tsvector' not found. - The index method is refused before the table is looked up:
CREATE INDEX nope_gin ON no_such_table USING gin (c)answersindex method gin is not yet supported, where PostgreSQL answersrelation "no_such_table" does not exist. - A btree index on the same kinds of column,
CREATE INDEX ... (tags)on anint[]column andCREATE INDEX ... (doc)on ajsonbcolumn, is created on both engines. USING hash,USING brinandUSING spgistfail the same way (index method hash is not yet supported, and so on); PostgreSQL creates all three. An unknown method,USING nonsense, answersindex method nonsense is not yet supported, where PostgreSQL answersaccess method "nonsense" does not exist.SELECT amname FROM pg_am ORDER BY 1answers the same seven rows on both engines,ginamong them.- The containment operators a GIN index serves fail too:
tags @> ARRAY[1]on anint[]column answersoperator does not exist: integer[] @> integer[], anddoc @> '{"a": 1}'on ajsonbcolumn answersJSON contains is not yet supported.doc ? 'b'answers the same row on both engines.
Possibly related
None found.
Environment
- DoltgreSQL 1.3.1, the newest release when this was written: image
dolthub/doltgresql:1.3.1, digestsha256:6c85cb1f35beabf47f094336a420255130b841b1645f36d79ef046276af36851. Its bundledpsqlis 17.11. - PostgreSQL 18.6: image
postgres:18.6-bookworm, digestsha256:1c59e2c3c818eaa0f0628f695b36e7c9e362d6b219b36a54a32df645cbd7e1af. Itspsqlis 18.6. - Reproduced on 2026-09-11 (UTC) with Docker 29.7.2 on Linux x86_64 (WSL 2).