Update Postgresql by Pgadmin without SQL command, but by Interface

Asked

Viewed 1,564 times

1

I need to change certain data from my database PostgreSQL for PgAdmin but I’d like it to be straight through the PgAdmin and not through SQL commands, this is possible. For example when I want to create a new column in some table, the interface itself makes it available to me.

inserir a descrição da imagem aqui

I searched but found only ways to do Update through SQL commands and would like to know if there is any possibility to do this somehow easier.

Attempt to change by pgAdmin4 interface:

Step 01:

inserir a descrição da imagem aqui

Step 02:

inserir a descrição da imagem aqui

Step 03:

inserir a descrição da imagem aqui

But I still couldn’t edit the records.

  • 1

    Yes it is possible, right click on the desired table goes in properties and then on the Columns tab.

  • @rray Change the column I already knew was possible, my need is to be able to change the data saved in the table without it being by means of SQL commands

  • Aaah got it, you want to change individually? this gives now if it is more than one record I do not know

  • Let’s say I’m in charge Select * from on a table, it brings me all the records of this table, what I need is, say I want to change a particular record, I click on that record and change its information there direct, without the need to update

  • 1

    In pgAdmin3 I would do so, click on the table name will on the option to display data ( do not remember the exact name) at the top will have a filter button there put your Where give a filter there can change the values by clicking on the cells.

  • I make a Select normal on that filter? select * from public. Table Where parameter

  • 1

    In the window that opens you put if I’m not mistaken only the conditions for example id = 20 and ativo = true will not select or Where only conditions them.

  • I have Pgadmin4 in it this option to click on the cells and change has not available

  • I’ll run some tests later on pgAdmin4.

  • I made a test here worked in pgAdmin4, the cells were editable ( I used the option view data > view filtred data) then click on the icon of the floppy disk to save the modifications. If you want to see how it is in pgAdmin3 see that answer

  • @rray I tried to do as you suggested but could not change the records, I edited my question step by step as I tried so you could see how I did. If you can shortly post a reply of how you did to change the records by the interface of pgAdmin4, soon it will be better

  • Have primary key this table?

  • 1

    @rray This one doesn’t have

  • So that must be why in the tables that have primary key works the procedure?

  • Perfect, it worked normally

  • I don’t know why this table doesn’t have a primary key :P but it should have one.

  • I am already changing this, actually this database is a legacy, I am adding in the tables the primary keys

Show 12 more comments

1 answer

1


After the help of @rray user I was able to solve the problem, the error was in my tables that did not have primary key and for this reason it was not possible to change the records directly by the pgAdmin4 interface

Browser other questions tagged

You are not signed in. Login or sign up in order to post.