I would like to update a field that has been delete from the backup database. how can I update the field from an other database
If you want to write an SQL statement that affects tables from different databases, the best option is to use a postgres_fdw foreign table.
But perhaps it is simpler to extract the data from one database to a file using
COPY and to load the file into the other database.
I solved I by using
I created the extension
CREATE EXTENSION dblink;
then I used it as:
UPDATE my_table t SET column_name=i.column_name, FROM dblink('dbname=other_db','SELECT id, x_column_name FROM my_table') as i(id INT, column_name TEXT) where t.id=i.id;