annotaterb icon indicating copy to clipboard operation
annotaterb copied to clipboard

Permission denied for table pg_index

Open Faq opened this issue 8 months ago • 0 comments

Rails 7.2

After migration from annotation by migration doc and running: annotaterb models

In project Rails is as frontend, no migrations are ever used. Annotate had no problem with that.

When trying to get table indexes in:

def retrieve_indexes_from_table
     table_name = @klass.table_name
     return [] unless table_name

     indexes = @klass.connection.indexes(table_name)

running into:

ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR:  permission denied for table pg_index (ActiveRecord::StatementInvalid)

Faq avatar Apr 07 '25 11:04 Faq