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:
The foreign keys:
category FK:
To make effective use of the index-only scan feature, you might choose to create a covering index, which is an index specifically designed to include the columns needed by a particular type of query that you run frequently.
Select column, right click and choose Properties... option to open column editor. Alternatively select column in tree control and on Properties tab and open column editor with edit icon. In the editor update Comment field and confirm changes with Save button.
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.
in our case this helped: before saving "new FK", firstly open "edit options" of "previously created FK", and DO NOT CHANGE anything then return to "newly created FK" edit options, save button magically activated
I can't reproduce your problem, as pgAdmin4 won't let me change anything about a constraint (other than its name) in the first place, so I can't get to the point where it would throw me an error like that. All the affordances to make changes are there, but they are all greyed out.
Also, PostgreSQL itself won't let you change an action on a FK constraint (there is simply no variant of "ALTER TABLE" which implements it), so you have to drop and recreate. So it is not surprising pgAdmin4 wont let me model such an action when it can't be done.
I don't know how you are getting it to produce this error, but it is probably a presentation bug in pgAdmin4, it is reporting an error condition as an error, but with a unhelpful message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With