postgresql and django - No unique identifier for this row

馋奶兔 提交于 2019-12-13 05:24:34

问题


Two entries on my Django postgresql database are causing me a world of trouble when I go a-querying to create reports. When I try to delete these entries (via phpPgAdmin), I get the error "No unique identifier for this row." There are no duplicate IDs. I've tried updating all the fields. I've tried getting rid of these using the delete button and manual SQL commands. I'm out of ideas. Anyone know hot to give a row a unique identifier so I can get rid of it?

Thanks!


回答1:


See the answer to this post: PHPpgAdmin: How delete rows without using SQL.




回答2:


Look up the row by the special ctid system column and then delete by that value. ctid's are unique.



来源:https://stackoverflow.com/questions/6650571/postgresql-and-django-no-unique-identifier-for-this-row

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!