Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PGAdmin Edit data

Tags:

I'm new to Postgres and can't seem to edit the data in the table. The test box pops up but doesn't allow me to change the text. This initial table didn't have any PK or SERIAL. So I added them and my table definition is now this:

CREATE TABLE public.weather ( city character varying(80) COLLATE pg_catalog."default", temp_lo integer, temp_hi integer, prcp real, date date, id integer NOT NULL DEFAULT nextval('weather_id_seq'::regclass), CONSTRAINT weather_pkey PRIMARY KEY (id) ) WITH ( OIDS = FALSE ) TABLESPACE pg_default;  ALTER TABLE public.weather OWNER to postgres; 

It's probably very simple

like image 237
Jonnny Avatar asked Nov 25 '16 15:11

Jonnny


People also ask

How do you edit data in pgAdmin?

To view or modify data, right click on a table or view name in the Browser tree control. When the context menu opens, use the View/Edit Data menu to specify the number of rows you would like to display in the editor panel. To modify the content of a table, each row in the table must be uniquely identifiable.

How do you edit a query in pgAdmin 4?

If you want to edit the query, simply click you the table and then from Tools in the menu bar click on the Query Tool that will allow you to make edition to the query.

How do you make a table editable in pgAdmin 4?

To edit table comment in Properties tab click edit icon to open table editor. or right click table and choose Properties... option. In table editor update Comment field and confirm with Save button.


2 Answers

Right-click on your table, select View Data/View All Rows (or one of the variants). That window will let you edit the data. Then press F6 to save changes (with thanks to leverglowh for pointing that out).

like image 61
Adam Benson Avatar answered Oct 02 '22 03:10

Adam Benson


Right-click on your table, select View/Edit Data -> All Rows:

enter image description here

Then there is an icon in the top bar, looking like a table with an arrow pointing down (the icon on the right of the screenshot below):

The icon on the right in the picture.

The icon is gray but works nevertheless.

like image 23
langlauf.io Avatar answered Oct 02 '22 01:10

langlauf.io