I have a complex join that I have working in the database manager but when I try and load it nothing appears and I found this in the logs: PostgreSQL layer has no primary key. What is actually wrong?

screen shot of the SQL window


I found the problem. There was a duplicated row produced by the join so the gids were not actually unique. I had checked that before but missed the duplicate entry.

To answer the question: PostgreSQL layer has no primary key means that the column you selected as having "unique integer values" in fact does not.

The other thing I discovered during this exercise is that one must have the log window open when doing complex stuff with the database manager. Otherwise things appear to fail silently.

  • I will, but you have to wait two days ;) – Russell Fulton Jun 5 '14 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.