PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> when trying to drop a foreign key constraint with an existing index that
> hasn't been used, you need to make a query against constraint table to get
> it working. see below for psql sequence of events
> ```
> mydb=> begin;
> BEGIN
> mydb=*> CREATE INDEX IF NOT EXISTS "child_table_parent_id_idx" ON
> "child_table"("parent_id");
> CREATE INDEX
> ... etc ...
This test case is incomplete on its face. (How was the table created?
Where did "child_table_parent_id_fkey" come from?) So it's hard to
tell what's going on, much less fix it. Could we have a complete
reproducer starting from an empty database?
regards, tom lane