How to insert a row in postgreSQL pgAdmin?

The accepted answer is related to PgAdmin 3 which is outdated and not supported.
For PgAdmin 4 and above, the application is running in the browser.

After you create your table, you have to make sure that your table has a primary key otherwise you couldn’t edit the data as mentioned in the official documentation.

To modify the content of a table, each row in the table must be
uniquely identifiable. If the table definition does not include an OID
or a primary key, the displayed data is read only. Note that views
cannot be edited; updatable views (using rules) are not supported.

1- Add primary key

Expand your table properties by clicking on it in the pgAdmin4 legend. Right-click on ‘Constraints’, select ‘Create’ –> ‘Primary Key’to define a primary key column.

enter image description here

2- View the data in excel like format

Browser view, right-click on your table –> select View/Edit Data –> All Rows
enter image description here

3- Add new row / Edit data

On the Data Output tab at the bottom of the table below the last row, there will be an empty row where you can enter new data in an excel-like manner. If you want to make updates you can also double click on any cell and change its value.

enter image description here

4- Save the changes

Click on the ‘Save’ button on the menu bar near the top of the data window.
enter image description here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)