PostgreSQL: What is meant by "please specify covering index name"

NullOrNotNull picture NullOrNotNull · Apr 26, 2020 · Viewed 10.7k times · Source

I wanted to edit the actions in a table. However I get the error message "Please specify covering index name." when I try to edit the FK. How do I fix this?

The table consists of only two columns:

picture of database table

The foreign keys:

foreign keys

category FK:

category FK

Answer

cYee picture cYee · Jul 7, 2020

Temporary workaround: Using pgAdmin

If you have a single foreign key:

Click on edit to expand, and click on it again to collapse, save button should be re-enable again.

If you have multiple foreign keys:

Repeat on every foreign key entry, click edit and "un-edit" for every foreign key, the Save button should be re-enable after every one of it is clicked.

Usually, whenever the error pop up when I want to add anything to the constraint, I will just expand and collapse every foreign key, save button should be working again.

For action,

If you want to add an action, eg: On update/On delete

The error message will pop up again. Don't forget to click on the '+' button to add the column, then repeat above steps(expand, collapse) to clear the error message, then you can save the foreign key. Yeah~ I know it is ugly...

For updating action for existing foreign key

Currently, I don't know any workaround, but the ugly way...

Delete the fkey -> recreate the foreign-key -> update the action -> clear the error message with above steps -> save.