Camilo Ortegón
Camilo Ortegón

Reputation: 3702

PgAdmin 4: Cannot edit rows from one table

Something strange is happening with my new created tables in Postgres, I can add data to them, but I cannot use PgAdmin to edit the any row.

This is my table columns description:

Table columns

After executing the query to view all table rows this is what I can see:

Right click at the table

At the Data Output

Save button is disabled to update my table rows. But this is happening only with my new created tables, as you can see, I have other tables where I'm able to edit rows, for example at this table of Users:

Other table that is able to edit data

Upvotes: 56

Views: 47161

Answers (2)

Akaisteph7
Akaisteph7

Reputation: 6524

  • My issue was that I was doing a join and pgAdmin didn't like that. I had to query the table directly.

  • Another possible cause is not including the primary key in the SELECT statement, whether it exists in the table or not.

  • If you need to add a primary key to an existing table, see this answer.

Upvotes: 0

Camilo Ortegón
Camilo Ortegón

Reputation: 3702

Found the problem! That was happening, because I didn't select any of the columns as 'Primary key':

Table columns description updated

Upvotes: 114

Related Questions